Page 1 of 1

wordpress - To many simultaneously "Get" request results in 500 error

Posted: Sat Apr 27, 2019 11:43 am
by krok
im using apache2 and nginx as proxy with a wordpress site. i have a plugin where user can download files from a url but i can see for example sometimes 50+ users are requsting at the same time and this results in a 500 error.

i have a 8GB VPS and have set php memory to 1024 and also tried to increase the timeout limit in apache2 config. what else setting can i adjust so this can work?

thank you

Re: wordpress - To many simultaneously "Get" request results in 500 error

Posted: Mon Apr 29, 2019 7:34 pm
by dreiggy
Try refer to this topic: viewtopic.php?t=17584

Re: wordpress - To many simultaneously "Get" request results in 500 error

Posted: Tue Apr 30, 2019 1:38 pm
by krok
dreiggy wrote:
Mon Apr 29, 2019 7:34 pm
Try refer to this topic: viewtopic.php?t=17584
Thanks i changed it already but i still get 500 error when many users are connecting at same time. is there a way to queue requests? so if i have 100 connections at same time instead of giving 500 it will just wait

Re: wordpress - To many simultaneously "Get" request results in 500 error

Posted: Tue Apr 30, 2019 6:38 pm
by dreiggy
Which process returning 5xx error? Apache or nginx? You should find first bottleneck, then search for solution. So first check who returning 5xx error.

Second thing is to check server monitoring logs. You have monitoring? You may try install netdata: https://netdata.cloud/

By default it will keep graphs for 1 hour.

Re: wordpress - To many simultaneously "Get" request results in 500 error

Posted: Wed May 01, 2019 9:38 am
by krok
dreiggy wrote:
Tue Apr 30, 2019 6:38 pm
Which process returning 5xx error? Apache or nginx? You should find first bottleneck, then search for solution. So first check who returning 5xx error.

Second thing is to check server monitoring logs. You have monitoring? You may try install netdata: https://netdata.cloud/

By default it will keep graphs for 1 hour.
Thanks! i tried finding bottleneck but default logs are merged from both nginx and apache2 so i might just separate them and see if its nginx or apache2. But this morning i had 300-400 requests at the same time from 100 IP and some of them was fine since i got 200 in logs but for maybe 20% there was 500 error again. i was also thinking maybe change my server to nginx+php-fpm and skip apache2, what do you think

Re: wordpress - To many simultaneously "Get" request results in 500 error

Posted: Wed May 01, 2019 2:31 pm
by dreiggy
Check logs directly from ssh in directories:
/var/log/httpd/domains
and
/var/log/nginx/domains

Re: wordpress - To many simultaneously "Get" request results in 500 error

Posted: Wed May 01, 2019 8:38 pm
by krok
dreiggy wrote:
Wed May 01, 2019 2:31 pm
Check logs directly from ssh in directories:
/var/log/httpd/domains
and
/var/log/nginx/domains
thanks but nothing there, default is access_log /var/log/apache2/domains/domain.com.log;

i checked there too but all the error is saying is that i get 500 on many "GET" so i think its apache, im running in prefork and what to change to accept many requests at same time?

Re: wordpress - To many simultaneously "Get" request results in 500 error

Posted: Thu May 02, 2019 2:31 pm
by dreiggy
Try to setup nginx+php-fpm. And check if it better performing. :)