1.16. Changing the timeout limit
You can specify a timeout value per service to prevent a malfunctioning service from freezing the system. Otherwise, the default value for timeout is 90 seconds for normal services and 300 seconds for SysV-compatible services.
Procedure
To extend timeout limit for the httpd service:
Copy the
httpdunit file to the/etc/systemd/system/directory:# cp /usr/lib/systemd/system/httpd.service /etc/systemd/system/httpd.serviceOpen the
/etc/systemd/system/httpd.servicefile and specify theTimeoutStartSecvalue in the[Service]section:... [Service] ... PrivateTmp=true TimeoutStartSec=10 [Install] WantedBy=multi-user.target ...Reload the
systemddaemon:# systemctl daemon-reload
Verification
Verify the new timeout value:
# systemctl show httpd -p TimeoutStartUSec注意To change the timeout limit globally, input the
DefaultTimeoutStartSecin the/etc/systemd/system.conffile.