• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Issue 500 Internal Server Error (nginx)

tomer628

Basic Pleskian
hi.

i got this error when i tried to enter to my website:
500 Internal Server Error (nginx) (attach picture)

Also i checked my Log and this what i got:
Code:
[alert] 9949#0: *240690 1024 worker_connections are not enough while connecting to upstream      
nginx error

this not the first time, what can i do to resolve ?
 

Attachments

  • 153.JPG
    153.JPG
    15 KB · Views: 10
Hi tomer628,

pls. consider to check your serverwide nginx configuration "/etc/nginx/nginx.conf". You have the choice to define your very own settings, as for example:

Code:
    user  nginx;
    worker_processes  4;

    worker_rlimit_nofile 64000;

    error_log  /var/log/nginx/error.log  warn;

    pid        /var/run/nginx.pid;

    include /etc/nginx/modules.conf.d/*.conf;

    events {
    worker_connections  4096;
    }

...
... where "worker_processes" could match the available cores

Example command to show the cores on your server:
Code:
grep processor /proc/cpuinfo | wc -l


... and "worker_rlimit_nofile" could match the "open - files - limit" settings from "/etc/security/limits.conf" for the system - user "nginx"

Example entries:
Code:
nginx           soft    nofile          64000
nginx           hard    nofile          64000


... and the standart setting for "worker_connections" ( 1024 ) can be multiplied with the numbers of your cores ( 4x1024 = 4096 ).​
 
Hi folks this sounds like I have the right thread.

We are running OS CentOS Linux 7.9.2009 (Core). we have 2 domain on the host each domain has max 100 MB storage use so it's not heavy sites, 1 is working well, the other https://turkeymedicals.com is giving the 500 error. As far as I know any 5XX is server side error.

1- Our hosting told to upgrade the 1 GB to 2 GB RAM, I see below memory limit to 1024MB. However still get the 500 error on the website, when we right click and oper few pages. The error seems to start after 5-6 pages are opening at the same time, so we took care of that part by disabling right click with a wordpress plugin. Th 500 also starts when we tweet a new post and few people click to open to read the post, at the same time maybe 10-12 people.

2- Hosting replied again this time told us it has to do with PHP version so we did that also to PHP support (PHP version 7.3.31) and run PHP as FASTCGI application served by Apache.

It has been few months past and annoying as we need the performance, we don not get any establishing database error at all.

3- Just again today hostng told us there is no problem accessing your website. Screenshot: Screenshot and the error 500 is a software error, and if the error is repeated, we recommend that you activate the error display by the software and provide control.

We have been using Plesk for 1 year now and have 2 servers, and not the IT guru to change any settings or fix the issue, other than perforing a backup and download.

Any feedback from the pro's would be greatly appriciated. Plesk is up-to-date. Thanks a lot.
 
Hello the news is great !

Among the answers given by our hosting, YOUR SOFTWARE ERROR, MODEM RESET, IPCONFIG, NGIX CACHE ARE NOT DECODED ON THE SERVER, THE BROWSER IS PROBLEM... but before that, the answer given to one of your support signs was to use CGI on us, and we slept on it. Because it came from a LEVEL specialist.

Even though yesterday I upgraded the server from 2GB to 4GB RAM, I found the solution by myself ' THE BEST PHP HANDLER FOR WORD PRESS '

1. PHP interface FMP application served by ngix
2. CACHE ngix enable, from WORDPRESS TOOLKIT

At the moment even if you open 20 pages AT THE SAME TIME on the site, with the settings above, runs like dual exhaust ferrari, in fact I have never seen a site burn rubber on the spot.

I recommend you to look at 1.4 seconds is SYDNEY AUSTRALIA Pingdom Tools

I hope this helps.
 

Attachments

  • Screenshot 2021-10-13 at 08-28-29 PHP Handler Types.png
    Screenshot 2021-10-13 at 08-28-29 PHP Handler Types.png
    142.2 KB · Views: 16
Hi tomer628,

pls. consider to check your serverwide nginx configuration "/etc/nginx/nginx.conf". You have the choice to define your very own settings, as for example:

Code:
[/INDENT][/INDENT]
[INDENT][INDENT]    user  nginx;[/INDENT][/INDENT]
[INDENT][INDENT]    worker_processes  4;[/INDENT][/INDENT]
[INDENT][INDENT][/INDENT][/INDENT]
[INDENT][INDENT]    worker_rlimit_nofile 64000;[/INDENT][/INDENT]
[INDENT][INDENT][/INDENT][/INDENT]
[INDENT][INDENT]    error_log  /var/log/nginx/error.log  warn;[/INDENT][/INDENT]
[INDENT][INDENT][/INDENT][/INDENT]
[INDENT][INDENT]    pid        /var/run/nginx.pid;[/INDENT][/INDENT]
[INDENT][INDENT][/INDENT][/INDENT]
[INDENT][INDENT]    include /etc/nginx/modules.conf.d/*.conf;[/INDENT][/INDENT]
[INDENT][INDENT][/INDENT][/INDENT]
[INDENT][INDENT]    events {[/INDENT][/INDENT]
[INDENT][INDENT]    worker_connections  4096;[/INDENT][/INDENT]
[INDENT][INDENT]    }[/INDENT][/INDENT]
[INDENT][INDENT][/INDENT][/INDENT]
[INDENT][INDENT]...
... where "worker_processes" could match the available cores​
Example command to show the cores on your server:
Code:
grep processor /proc/cpuinfo | wc -l



... and "worker_rlimit_nofile" could match the "open - files - limit" settings from "/etc/security/limits.conf" for the system - user "nginx"​
Example entries:
Code:
nginx           soft    nofile          64000[/INDENT][/INDENT]
[INDENT][INDENT]nginx           hard    nofile          64000



... and the standart setting for "worker_connections" ( 1024 ) can be multiplied with the numbers of your cores ( 4x1024 = 4096 ).​
Have same issues. Dedicated server with 24 core CPU and 128gb memory and getting 1024 worker_connections are not enough while connecting to upstream errors and websites are down till i restart nginx service or sometimes the wholse server. Tried increasing worker_processes and worker_connections, let's see what happens.
 
Back
Top