Httpd (apache) won't stop gracefully when user is logged in the gui


#1

I noticed a delay in shutdown and reboot with FreePBX distro in certain circumstances. After investigating I discovered that the problem is with httpd (apache). It won’t stop gracefully when I’m logged in the GUI.

FreePBX version:

$ cat /etc/schmooze/pbx-version
12.7.6-1904-1.sng7

This is a testing environment in VM (Virtualbox and proxmox KVM). I have made tests with clean install (not even updated the system), with updates applied, with my configs applied (ansible), with a restore from the system in production. In all the cases the result is the same.

Steps to reproduce:

  1. Login in the FreePBX GUI and stay logged in.

  2. In the terminal (CLI) stop httpd (apache)

    $ systemctl stop httpd
    

The command will take ~90 seconds to terminate.

This is the output of journalctl -f -u httpd.service during those 90 seconds:

Oct 21 08:57:08 freepbx.sangoma.local systemd[1]: Stopping The Apache HTTP Server...
Oct 21 08:58:38 freepbx.sangoma.local systemd[1]: httpd.service stop-sigterm timed out. Killing.
Oct 21 08:58:38 freepbx.sangoma.local systemd[1]: httpd.service: main process exited, code=killed, status=9/KILL
Oct 21 08:58:38 freepbx.sangoma.local systemd[1]: Stopped The Apache HTTP Server.
Oct 21 08:58:38 freepbx.sangoma.local systemd[1]: Unit httpd.service entered failed state.
Oct 21 08:58:38 freepbx.sangoma.local systemd[1]: httpd.service failed.

If I start the service again and logout from the GUI, then the service takes ~2 seconds to stop, which I assume should be the normal behaviour.

I found nothing useful form apache logs. Not even with debug turned on. I can show you the logs if you want.

This is causing the VM to take ~1.5 minutes to shutdown, which is a problem for me.

Is this normal? One has to be logged out the GUI for the system to shutdown clean?


(TheJames) #2

In passive testing I can confirm this.

With the UI closed
apachectl stop
is almost instant.
with the UI open, it is not.

running
apachectl status
during the delay shows

   CGroup: /system.slice/httpd.service
           |-25833 /usr/sbin/httpd -DFOREGROUND

in
lsof | grep 25833
I see

# lsof | grep 25833
httpd     25833           root  cwd       DIR              253,0       276         64 /
httpd     25833           root  rtd       DIR              253,0       276         64 /
httpd     25833           root  txt       REG              253,0    523680  135794818 /usr/sbin/httpd
httpd     25833           root  DEL       REG                0,4              4226102 /dev/zero
httpd     25833           root  DEL       REG                0,4            634814466 /SYSV00000000
httpd     25833           root  mem       REG              253,0    121808   67579489 /usr/lib64/php/modules/zip.so
httpd     25833           root  mem       REG              253,0     19384  134343944 /usr/lib64/libgpg-error.so.0.10.0
httpd     25833           root  mem       REG              253,0    535064  134343949 /usr/lib64/libgcrypt.so.11.8.2
httpd     25833           root  mem       REG              253,0    258344  134344045 /usr/lib64/libxslt.so.1.1.28
httpd     25833           root  mem       REG              253,0     87368  134344043 /usr/lib64/libexslt.so.0.8.17
httpd     25833           root  mem       REG              253,0     37176   67579516 /usr/lib64/php/modules/xsl.so
httpd     25833           root  mem       REG              253,0     49232   67579515 /usr/lib64/php/modules/xmlwriter.so
httpd     25833           root  mem       REG              253,0     33008   67579514 /usr/lib64/php/modules/xmlreader.so
httpd     25833           root  mem       REG              253,0     40936   67579513 /usr/lib64/php/modules/wddx.so
httpd     25833           root  mem       REG              253,0     54264   67579488 /usr/lib64/php/modules/xml.so
httpd     25833           root  mem       REG              253,0     19816   67579487 /usr/lib64/php/modules/tokenizer.so
httpd     25833           root  mem       REG              253,0     15792   67579506 /usr/lib64/php/modules/sysvshm.so
httpd     25833           root  mem       REG              253,0     11568   67579505 /usr/lib64/php/modules/sysvsem.so
httpd     25833           root  mem       REG              253,0     19984   67579504 /usr/lib64/php/modules/sysvmsg.so
httpd     25833           root  mem       REG              253,0     80672   68937399 /usr/lib64/php/modules/ssh2.so
httpd     25833           root  mem       REG              253,0     51472   67579496 /usr/lib64/php/modules/sqlite3.so
httpd     25833           root  mem       REG              253,0     91488   67579486 /usr/lib64/php/modules/sockets.so
httpd     25833           root  mem       REG              253,0    368384   67579498 /usr/lib64/php/modules/soap.so
httpd     25833           root  mem       REG              253,0     54280   67579485 /usr/lib64/php/modules/simplexml.so
httpd     25833           root  mem       REG              253,0     15712   67579484 /usr/lib64/php/modules/shmop.so
httpd     25833           root  mem       REG              253,0    289448   67588901 /usr/lib64/php/modules/redis.so
httpd     25833           root  mem       REG              253,0     32984   67579503 /usr/lib64/php/modules/posix.so
httpd     25833           root  mem       REG              253,0    272160   67579483 /usr/lib64/php/modules/phar.so
httpd     25833           root  mem       REG              253,0    753232  134343966 /usr/lib64/libsqlite3.so.0.8.6
httpd     25833           root  mem       REG              253,0     29248   67579495 /usr/lib64/php/modules/pdo_sqlite.so
httpd     25833           root  mem       REG              253,0     28968   67588910 /usr/lib64/php/modules/pdo_odbc.so
httpd     25833           root  mem       REG              253,0     33256   67588916 /usr/lib64/php/modules/pdo_mysql.so
httpd     25833           root  mem       REG              253,0    120528   67579494 /usr/lib64/php/modules/pdo.so
httpd     25833           root  mem       REG              253,0     41272  134343977 /usr/lib64/libltdl.so.7.3.0
httpd     25833           root  mem       REG              253,0    429728  134343992 /usr/lib64/libodbc.so.2.0.0
httpd     25833           root  mem       REG              253,0     70416   67588909 /usr/lib64/php/modules/odbc.so
httpd     25833           root  mem       REG              253,0    150160   67588915 /usr/lib64/php/modules/mysqli.so
httpd     25833           root  mem       REG              253,0   3135712     154090 /usr/lib64/mysql/libmysqlclient.so.18.0.0
httpd     25833           root  mem       REG              253,0     58016   67588914 /usr/lib64/php/modules/mysql.so
httpd     25833           root  mem       REG              253,0   1421128   67588920 /usr/lib64/php/modules/mbstring.so
httpd     25833           root  mem       REG              253,0    381416  134741220 /usr/lib64/libldap_r-2.4.so.2.10.7
httpd     25833           root  mem       REG              253,0     66232   67588918 /usr/lib64/php/modules/ldap.so
httpd     25833           root  mem       REG              253,0     48848   67579482 /usr/lib64/php/modules/json.so
httpd     25833           root  mem       REG              253,0     57184  134344090 /usr/lib64/libicuio.so.50.1.2
httpd     25833           root  mem       REG              253,0  20781704  134344086 /usr/lib64/libicudata.so.50.1.2
httpd     25833           root  mem       REG              253,0   1539544  134344100 /usr/lib64/libicuuc.so.50.1.2
httpd     25833           root  mem       REG              253,0   2096104  134344088 /usr/lib64/libicui18n.so.50.1.2
httpd     25833           root  mem       REG              253,0    399560   67588926 /usr/lib64/php/modules/intl.so
httpd     25833           root  mem       REG              253,0     61312   67579387 /usr/lib64/php/modules/igbinary.so
httpd     25833           root  mem       REG              253,0     45240   67579481 /usr/lib64/php/modules/iconv.so
httpd     25833           root  mem       REG              253,0    495712  134336220 /usr/lib64/libgmp.so.10.2.0
httpd     25833           root  mem       REG              253,0     70400   67579480 /usr/lib64/php/modules/gmp.so
httpd     25833           root  mem       REG              253,0     15712   67579479 /usr/lib64/php/modules/gettext.so
httpd     25833           root  mem       REG              253,0     15512  135038300 /usr/lib64/libXau.so.6.0.0
httpd     25833           root  mem       REG              253,0    165976  135038352 /usr/lib64/libxcb.so.1.1.0
httpd     25833           root  mem       REG              253,0    795608  134343942 /usr/lib64/libfreetype.so.6.14.0
httpd     25833           root  mem       REG              253,0    285408  134343862 /usr/lib64/libjpeg.so.62.1.0
httpd     25833           root  mem       REG              253,0    179296  134343933 /usr/lib64/libpng15.so.15.13.0
httpd     25833           root  mem       REG              253,0     74504  135056533 /usr/lib64/libXpm.so.4.11.0
httpd     25833           root  mem       REG              253,0   1318800  135038356 /usr/lib64/libX11.so.6.3.0
httpd     25833           root  mem       REG              253,0    299824  135056539 /usr/lib64/libt1.so.5.1.2
httpd     25833           root  mem       REG              253,0    399288   67588922 /usr/lib64/php/modules/gd.so
httpd     25833           root  mem       REG              253,0     57800   67579478 /usr/lib64/php/modules/ftp.so
httpd     25833           root  mem       REG              253,0   2901856   67579477 /usr/lib64/php/modules/fileinfo.so
httpd     25833           root  mem       REG              253,0     65592   67579476 /usr/lib64/php/modules/exif.so
httpd     25833           root  mem       REG              253,0    180784   67579512 /usr/lib64/php/modules/dom.so
httpd     25833           root  mem       REG              253,0    110728   68937401 /usr/lib64/php/modules/digium_register.so
httpd     25833           root  mem       REG              253,0    121320  134468098 /usr/lib64/libsasl2.so.3.0.0
httpd     25833           root  mem       REG              253,0    352608  134741218 /usr/lib64/libldap-2.4.so.2.10.7
httpd     25833           root  mem       REG              253,0     61952  134741216 /usr/lib64/liblber-2.4.so.2.10.7
httpd     25833           root  mem       REG              253,0    251832  134543407 /usr/lib64/libnspr4.so
httpd     25833           root  mem       REG              253,0     20096  134543408 /usr/lib64/libplc4.so
httpd     25833           root  mem       REG              253,0     15800  134543409 /usr/lib64/libplds4.so
httpd     25833           root  mem       REG              253,0    199008  134543410 /usr/lib64/libnssutil3.so
httpd     25833           root  mem       REG              253,0   1249576  134479714 /usr/lib64/libnss3.so
httpd     25833           root  mem       REG              253,0    164288  134479715 /usr/lib64/libsmime3.so
httpd     25833           root  mem       REG              253,0    340976  134479716 /usr/lib64/libssl3.so
httpd     25833           root  mem       REG              253,0    174176  134594453 /usr/lib64/libssh2.so.1.0.1
httpd     25833           root  mem       REG              253,0    208920  134344056 /usr/lib64/libidn.so.11.6.11
httpd     25833           root  mem       REG              253,0    435192  134741170 /usr/lib64/libcurl.so.4.3.0
httpd     25833           root  mem       REG              253,0     86992   67579475 /usr/lib64/php/modules/curl.so
httpd     25833           root  mem       REG              253,0     15648   67579474 /usr/lib64/php/modules/ctype.so
httpd     25833           root  mem       REG              253,0     33872   67579473 /usr/lib64/php/modules/calendar.so
httpd     25833           root  mem       REG              253,0     24816   67579472 /usr/lib64/php/modules/bz2.so
httpd     25833           root  mem       REG              253,0     32696   67588924 /usr/lib64/php/modules/bcmath.so
httpd     25833           root  mem       REG              253,0    161320   68181103 /usr/lib64/php/modules/opcache.so
httpd     25833           root  mem       REG              253,0    991616  134543372 /usr/lib64/libstdc++.so.6.0.19
httpd     25833           root  mem       REG              253,0   1455120   68181102 /usr/lib64/php/modules/ZendGuardLoader.so
httpd     25833           root  mem       REG              253,0    253216   68812706 /usr/lib64/php/modules/xdebug.so
httpd     25833           root  mem       REG              253,0     61624  134320941 /usr/lib64/libnss_files-2.17.so
httpd     25833           root  mem       REG              253,0   1509376  134343823 /usr/lib64/libxml2.so.2.9.1
httpd     25833           root  mem       REG              253,0    115848  134320933 /usr/lib64/libnsl-2.17.so
httpd     25833           root  mem       REG              253,0   4773760    1131103 /usr/lib64/httpd/modules/libphp5.so
httpd     25833           root  mem       REG              253,0     27808    1095469 /usr/lib64/httpd/modules/mod_cgi.so
httpd     25833           root  mem       REG              253,0     68192  134343826 /usr/lib64/libbz2.so.1.0.6
httpd     25833           root  mem       REG              253,0    157424  134343821 /usr/lib64/liblzma.so.5.2.2
httpd     25833           root  mem       REG              253,0    100008  134343973 /usr/lib64/libelf-0.172.so
httpd     25833           root  mem       REG              253,0     19896  134336224 /usr/lib64/libattr.so.1.1.0
httpd     25833           root  mem       REG              253,0     88776  134315087 /usr/lib64/libgcc_s-4.8.5-20150702.so.1
httpd     25833           root  mem       REG              253,0    330464  135104242 /usr/lib64/libdw-0.172.so
httpd     25833           root  mem       REG              253,0     20032  134336227 /usr/lib64/libcap.so.2.22
httpd     25833           root  mem       REG              253,0     43776  134320953 /usr/lib64/librt-2.17.so
httpd     25833           root  mem       REG              253,0     28128  135104247 /usr/lib64/libsystemd-daemon.so.0.0.12
httpd     25833           root  mem       REG              253,0     11200    1131056 /usr/lib64/httpd/modules/mod_systemd.so
httpd     25833           root  mem       REG              253,0    105824  134320951 /usr/lib64/libresolv-2.17.so
httpd     25833           root  mem       REG              253,0     15688  134336264 /usr/lib64/libkeyutils.so.1.5
httpd     25833           root  mem       REG              253,0     67104  134336285 /usr/lib64/libkrb5support.so.0.1
httpd     25833           root  mem       REG              253,0    210824  134336277 /usr/lib64/libk5crypto.so.3.1
httpd     25833           root  mem       REG              253,0     15920  134543403 /usr/lib64/libcom_err.so.2.1
httpd     25833           root  mem       REG              253,0    967848  134336283 /usr/lib64/libkrb5.so.3.3
httpd     25833           root  mem       REG              253,0    320400  134336273 /usr/lib64/libgssapi_krb5.so.2.2
httpd     25833           root  mem       REG              253,0   2516624  134336296 /usr/lib64/libcrypto.so.1.0.2k
httpd     25833           root  mem       REG              253,0    470360  134336298 /usr/lib64/libssl.so.1.0.2k
httpd     25833           root  mem       REG              253,0    219520    1639242 /usr/lib64/httpd/modules/mod_ssl.so
httpd     25833           root  mem       REG              253,0     19440    1131038 /usr/lib64/httpd/modules/mod_proxy_wstunnel.so
httpd     25833           root  mem       REG              253,0     19544    1131037 /usr/lib64/httpd/modules/mod_proxy_scgi.so
httpd     25833           root  mem       REG              253,0     40040    1131036 /usr/lib64/httpd/modules/mod_proxy_http.so
httpd     25833           root  mem       REG              253,0     44280    1131035 /usr/lib64/httpd/modules/mod_proxy_ftp.so
httpd     25833           root  mem       REG              253,0     11248    1131034 /usr/lib64/httpd/modules/mod_proxy_fdpass.so
httpd     25833           root  mem       REG              253,0     19456    1131033 /usr/lib64/httpd/modules/mod_proxy_fcgi.so
httpd     25833           root  mem       REG              253,0     11280    1131032 /usr/lib64/httpd/modules/mod_proxy_express.so
httpd     25833           root  mem       REG              253,0     19480    1131031 /usr/lib64/httpd/modules/mod_proxy_connect.so
httpd     25833           root  mem       REG              253,0     48264    1131030 /usr/lib64/httpd/modules/mod_proxy_balancer.so
httpd     25833           root  mem       REG              253,0     52512    1131029 /usr/lib64/httpd/modules/mod_proxy_ajp.so
httpd     25833           root  mem       REG              253,0     15408    1131015 /usr/lib64/httpd/modules/mod_lbmethod_heartbeat.so
httpd     25833           root  mem       REG              253,0     11208    1131014 /usr/lib64/httpd/modules/mod_lbmethod_bytraffic.so
httpd     25833           root  mem       REG              253,0     11216    1131013 /usr/lib64/httpd/modules/mod_lbmethod_byrequests.so
httpd     25833           root  mem       REG              253,0     11216    1131012 /usr/lib64/httpd/modules/mod_lbmethod_bybusyness.so
httpd     25833           root  mem       REG              253,0    118928    1131028 /usr/lib64/httpd/modules/mod_proxy.so
httpd     25833           root  mem       REG              253,0     31968    1131025 /usr/lib64/httpd/modules/mod_mpm_prefork.so
httpd     25833           root  mem       REG              253,0   1137024  134320931 /usr/lib64/libm-2.17.so
httpd     25833           root  mem       REG              253,0    193864  134343844 /usr/lib64/liblua-5.1.so
httpd     25833           root  mem       REG              253,0    117184    1131020 /usr/lib64/httpd/modules/mod_lua.so
httpd     25833           root  mem       REG              253,0     19728    1095475 /usr/lib64/httpd/modules/mod_dav_lock.so
httpd     25833           root  mem       REG              253,0     57208    1095474 /usr/lib64/httpd/modules/mod_dav_fs.so
httpd     25833           root  mem       REG              253,0    102520    1095473 /usr/lib64/httpd/modules/mod_dav.so
httpd     25833           root  mem       REG              253,0     11272    1131062 /usr/lib64/httpd/modules/mod_vhost_alias.so
httpd     25833           root  mem       REG              253,0     11200    1131061 /usr/lib64/httpd/modules/mod_version.so
httpd     25833           root  mem       REG              253,0     11264    1131059 /usr/lib64/httpd/modules/mod_userdir.so
httpd     25833           root  mem       REG              253,0     15392    1131058 /usr/lib64/httpd/modules/mod_unixd.so
httpd     25833           root  mem       REG              253,0     11224    1131057 /usr/lib64/httpd/modules/mod_unique_id.so
httpd     25833           root  mem       REG              253,0     11256    1131055 /usr/lib64/httpd/modules/mod_suexec.so
httpd     25833           root  mem       REG              253,0     15368    1131054 /usr/lib64/httpd/modules/mod_substitute.so
httpd     25833           root  mem       REG              253,0     23552    1131053 /usr/lib64/httpd/modules/mod_status.so
httpd     25833           root  mem       REG              253,0     23656    1131051 /usr/lib64/httpd/modules/mod_socache_shmcb.so
httpd     25833           root  mem       REG              253,0     11280    1131050 /usr/lib64/httpd/modules/mod_socache_memcache.so
httpd     25833           root  mem       REG              253,0     15408    1131049 /usr/lib64/httpd/modules/mod_socache_dbm.so
httpd     25833           root  mem       REG              253,0     15488    1131048 /usr/lib64/httpd/modules/mod_slotmem_shm.so
httpd     25833           root  mem       REG              253,0     11328    1131047 /usr/lib64/httpd/modules/mod_slotmem_plain.so
httpd     25833           root  mem       REG              253,0     15408    1131046 /usr/lib64/httpd/modules/mod_setenvif.so
httpd     25833           root  mem       REG              253,0     69128    1131044 /usr/lib64/httpd/modules/mod_rewrite.so
httpd     25833           root  mem       REG              253,0     15416    1131042 /usr/lib64/httpd/modules/mod_reqtimeout.so
httpd     25833           root  mem       REG              253,0     15392    1131041 /usr/lib64/httpd/modules/mod_remoteip.so
httpd     25833           root  mem       REG              253,0     36096    1131027 /usr/lib64/httpd/modules/mod_negotiation.so
httpd     25833           root  mem       REG              253,0     19608    1131022 /usr/lib64/httpd/modules/mod_mime.so
httpd     25833           root  mem       REG              253,0     27816    1131023 /usr/lib64/httpd/modules/mod_mime_magic.so
httpd     25833           root  mem       REG              253,0     11304    1131019 /usr/lib64/httpd/modules/mod_logio.so
httpd     25833           root  mem       REG              253,0     28296    1131016 /usr/lib64/httpd/modules/mod_log_config.so
httpd     25833           root  mem       REG              253,0     28208    1131011 /usr/lib64/httpd/modules/mod_info.so
httpd     25833           root  mem       REG              253,0     52624    1131010 /usr/lib64/httpd/modules/mod_include.so
httpd     25833           root  mem       REG              253,0     23848    1095487 /usr/lib64/httpd/modules/mod_headers.so
httpd     25833           root  mem       REG              253,0     19512    1095486 /usr/lib64/httpd/modules/mod_filter.so
httpd     25833           root  mem       REG              253,0     23632    1095484 /usr/lib64/httpd/modules/mod_ext_filter.so
httpd     25833           root  mem       REG              253,0     15400    1095483 /usr/lib64/httpd/modules/mod_expires.so
httpd     25833           root  mem       REG              253,0     11264    1095482 /usr/lib64/httpd/modules/mod_env.so
httpd     25833           root  mem       REG              253,0     11256    1095481 /usr/lib64/httpd/modules/mod_echo.so
httpd     25833           root  mem       REG              253,0     11280    1095480 /usr/lib64/httpd/modules/mod_dumpio.so
httpd     25833           root  mem       REG              253,0     11264    1095479 /usr/lib64/httpd/modules/mod_dir.so
httpd     25833           root  mem       REG              253,0     90248  134543370 /usr/lib64/libz.so.1.2.7
httpd     25833           root  mem       REG              253,0     31920    1095477 /usr/lib64/httpd/modules/mod_deflate.so
httpd     25833           root  mem       REG              253,0     23712    1095476 /usr/lib64/httpd/modules/mod_dbd.so
httpd     25833           root  mem       REG              253,0     11184    1095472 /usr/lib64/httpd/modules/mod_data.so
httpd     25833           root  mem       REG              253,0     36184    1095467 /usr/lib64/httpd/modules/mod_cache_disk.so
httpd     25833           root  mem       REG              253,0     73368    1095466 /usr/lib64/httpd/modules/mod_cache.so
httpd     25833           root  mem       REG              253,0     40160    1095464 /usr/lib64/httpd/modules/mod_autoindex.so
httpd     25833           root  mem       REG              253,0      7128    1095463 /usr/lib64/httpd/modules/mod_authz_user.so
httpd     25833           root  mem       REG              253,0     11224    1095462 /usr/lib64/httpd/modules/mod_authz_owner.so
httpd     25833           root  mem       REG              253,0     11280    1095461 /usr/lib64/httpd/modules/mod_authz_host.so
httpd     25833           root  mem       REG              253,0     11280    1095460 /usr/lib64/httpd/modules/mod_authz_groupfile.so
httpd     25833           root  mem       REG              253,0     11296    1095459 /usr/lib64/httpd/modules/mod_authz_dbm.so
httpd     25833           root  mem       REG              253,0     15392    1095458 /usr/lib64/httpd/modules/mod_authz_dbd.so
httpd     25833           root  mem       REG              253,0     23832    1095457 /usr/lib64/httpd/modules/mod_authz_core.so
httpd     25833           root  mem       REG              253,0     19632    1095456 /usr/lib64/httpd/modules/mod_authn_socache.so
httpd     25833           root  mem       REG              253,0     11264    1095455 /usr/lib64/httpd/modules/mod_authn_file.so
httpd     25833           root  mem       REG              253,0     11280    1095454 /usr/lib64/httpd/modules/mod_authn_dbm.so
httpd     25833           root  mem       REG              253,0     15360    1095453 /usr/lib64/httpd/modules/mod_authn_dbd.so
httpd     25833           root  mem       REG              253,0     15456    1095452 /usr/lib64/httpd/modules/mod_authn_core.so
httpd     25833           root  mem       REG              253,0     11240    1095451 /usr/lib64/httpd/modules/mod_authn_anon.so
httpd     25833           root  mem       REG              253,0     36168    1095450 /usr/lib64/httpd/modules/mod_auth_digest.so
httpd     25833           root  mem       REG              253,0     15416    1095449 /usr/lib64/httpd/modules/mod_auth_basic.so
httpd     25833           root  mem       REG              253,0     11232    1095447 /usr/lib64/httpd/modules/mod_allowmethods.so
httpd     25833           root  mem       REG              253,0     15464    1095446 /usr/lib64/httpd/modules/mod_alias.so
httpd     25833           root  mem       REG              253,0     11256    1095445 /usr/lib64/httpd/modules/mod_actions.so
httpd     25833           root  mem       REG              253,0     11304    1095444 /usr/lib64/httpd/modules/mod_access_compat.so
httpd     25833           root  mem       REG              253,0     11448  134320871 /usr/lib64/libfreebl3.so
httpd     25833           root  mem       REG              253,0     20112  134343830 /usr/lib64/libuuid.so.1.3.0
httpd     25833           root  mem       REG              253,0   2151672  134320923 /usr/lib64/libc-2.17.so
httpd     25833           root  mem       REG              253,0     19288  134320929 /usr/lib64/libdl-2.17.so
httpd     25833           root  mem       REG              253,0    141968  134320949 /usr/lib64/libpthread-2.17.so
httpd     25833           root  mem       REG              253,0    198600  134468109 /usr/lib64/libapr-1.so.0.4.8
httpd     25833           root  mem       REG              253,0   1850464  134343837 /usr/lib64/libdb-5.3.so
httpd     25833           root  mem       REG              253,0    173320  134343836 /usr/lib64/libexpat.so.1.6.0
httpd     25833           root  mem       REG              253,0     40664  134320927 /usr/lib64/libcrypt-2.17.so
httpd     25833           root  mem       REG              253,0    172288  134479683 /usr/lib64/libaprutil-1.so.0.5.2
httpd     25833           root  mem       REG              253,0    155784  134336206 /usr/lib64/libselinux.so.1
httpd     25833           root  mem       REG              253,0    402384  134543412 /usr/lib64/libpcre.so.1.2.0
httpd     25833           root  mem       REG              253,0    163400  134320916 /usr/lib64/ld-2.17.so
httpd     25833           root  DEL       REG                0,4              4226104 /dev/zero
httpd     25833           root  DEL       REG                0,4              4226098 /dev/zero
httpd     25833           root  DEL       REG                0,4            634781697 /SYSV01137c30
httpd     25833           root    0r      CHR                1,3       0t0       1028 /dev/null
httpd     25833           root    1u     unix 0xffff9e7a19e09400       0t0    4226051 socket
httpd     25833           root    2w      REG              253,0      1588   68879565 /var/log/httpd/error_log
httpd     25833           root    3u     sock                0,7       0t0    4226059 protocol: TCP
httpd     25833           root    5u     sock                0,7       0t0    4226065 protocol: TCP
httpd     25833           root    7u     sock                0,7       0t0    4226071 protocol: TCP
httpd     25833           root    9u     sock                0,7       0t0    4226077 protocol: TCP
httpd     25833           root   11r     FIFO                0,9       0t0    4226095 pipe
httpd     25833           root   12w     FIFO                0,9       0t0    4226095 pipe
httpd     25833           root   13w      REG              253,0       527   68879566 /var/log/httpd/ssl_error_log
httpd     25833           root   14w      REG              253,0    741641   68869909 /var/log/httpd/access_log
httpd     25833           root   15w      REG              253,0         0   69071410 /var/log/httpd/ssl_access_log
httpd     25833           root   16w      REG              253,0         0   69071411 /var/log/httpd/ssl_request_log
httpd     25833           root   17u      REG              253,0         0    3467670 /tmp/ZCUDqJ88Ag (deleted)
httpd     25833           root   18u      REG              253,0         0    3467671 /tmp/.ZendSem.aqAVpu (deleted)

That may provide someone the needed data to fix the issue(s).
tl;dr something has a persistant file handle open while there is a web page open. This delays the stop


#3

Doing more tests I found out the delay only occurs when the user is in Dashboard (apparently).

If I go to “Reports > Asterisk Info”, for example, and then stop asterisk, it stops normal, without delay.

So, the problem seems with the Dashboard module.