Hello,
I get the following error when I try to make changes in the admin panel
Error: nginx restart failed
But when I try to restart nginx manually, it restarts successfully.
I run systemctl status nginx and everything looks ok.
Any Ideas?
Hello,
I get the following error when I try to make changes in the admin panel
Error: nginx restart failed
But when I try to restart nginx manually, it restarts successfully.
I run systemctl status nginx and everything looks ok.
Any Ideas?
Enable debug mode in the server settings
And make your changes and check /var/log/hestia/debug.log
OK did it… and get the following:
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: [emerg] open() "/var/log/nginx/domains/webmail.mydomain.cx.log" failed (24: Too many open files)
nginx: configuration file /etc/nginx/nginx.conf test failed
/etc/systemd/system/nginx.service.d/override.conf does not exist
Create it
Did it but
cat /proc/ < nginx-pid > /limits
-bash: nginx-pid: No such file or directory
And the problem continues
Is there a mabe second nginx config for the hestia panel?
Any Ideas?
Did you literally typed “nginx-pid” or the pid of nginx service running (some number ) ?
ps -ef | grep nginx, look for nginx pid
pgrep nginx
find the program id (pid) of nginx and put the number in place of "nginx-pid’
eg. cat /proc/22343/limits
It seems that there are 2 instances of nginx running
/usr/sbin/nginx -c /etc/nginx/nginx.conf
Limit Soft Limit Hard Limit Units
Max cpu time unlimited unlimited seconds
Max file size unlimited unlimited bytes
Max data size unlimited unlimited bytes
Max stack size 8388608 unlimited bytes
Max core file size 0 unlimited bytes
Max resident set unlimited unlimited bytes
Max processes 127090 127090 processes
Max open files 1048576 1048576 files
Max locked memory 4170336256 4170336256 bytes
Max address space unlimited unlimited bytes
Max file locks unlimited unlimited locks
Max pending signals 127090 127090 signals
Max msgqueue size 819200 819200 bytes
Max nice priority 0 0
Max realtime priority 0 0
Max realtime timeout unlimited unlimited us
/usr/local/hestia/nginx/sbin/hestia-nginx
Limit Soft Limit Hard Limit Units
Max cpu time unlimited unlimited seconds
Max file size unlimited unlimited bytes
Max data size unlimited unlimited bytes
Max stack size 8388608 unlimited bytes
Max core file size 0 unlimited bytes
Max resident set unlimited unlimited bytes
Max processes 127090 127090 processes
Max open files 1024 524288 files
Max locked memory 65536 65536 bytes
Max address space unlimited unlimited bytes
Max file locks unlimited unlimited locks
Max pending signals 127090 127090 signals
Max msgqueue size 819200 819200 bytes
Max nice priority 0 0
Max realtime priority 0 0
Max realtime timeout unlimited unlimited us
The hestia-nginx has the problem I think… where is its config?
hestia-nginx is only used for the panel. It should not be the issue it is the main hestia service…
systemctl restart Nginx
systemctl status Nginx
We usually reload the config instead of reloading so that might be the issue
I have done that and the status is ok
reboot the server
Did that… again the same
Where does the panel create the webmail nginx config per domain?
Here /home/ACCOUNT/conf/mail/DOMAIN/
Hello Again,
The error I get is for all the webmail entries
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: [emerg] open() "/var/log/nginx/domains/webmail.mydomain.cx.log" failed (24: Too many open files)
nginx: configuration file /etc/nginx/nginx.conf test failed
if I delete one it goes to the next one.
As a note the server is working fine all domains are hosted correctly and nginx starts and restarts succesfuly, only actions within hestia and nginx -t resove with errors.
Also I tried:
sudo -u nginx bash -c 'ulimit -n'
and I get 1024.
Hello Again,
The error I get is for all the webmail entries
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: [emerg] open() "/var/log/nginx/domains/webmail.mydomain.cx.log" failed (24: Too many open files)
nginx: configuration file /etc/nginx/nginx.conf test failed
if I delete one it goes to the next one.
As a note the server is working fine all domains are hosted correctly and nginx starts and restarts succesfuly, only actions within hestia and nginx -t resove with errors.
Also I tried:
sudo -u nginx bash -c 'ulimit -n'
and I get 1024.