Jump to content

Server keeps throwing 500 error and server load is always above 1.00 Please Help.


rushaboswal.rdx

Recommended Posts

Hello my website was running fine for around 2 years and suddenly this happened.

It keeps throwing 500 errors and server load is always around 1.00-1.10. 
When contacted hosting they said too many proccess are running . But im unable to pinpoint the exact issue from logs or any other help topics.

Can somebody please help.

leo datran.png

Link to comment
Share on other sites

Hi, 

A vcouple of issues spotted

 

1. Lower your PHP from 7.4 to 7.2 - Ps .1.5.2 doesn't support the latest PHP ==> 

https://devdocs.prestashop.com/1.7/basics/installation/system-requirements/

2. Ask your host to activate either PHP x-ray or new relic on the server. 

3. Ask your host to activate for 1 H the server slow query logs . 

What they said it equals to zero! It would have been the same if I would have said about their host that s...s, without getting proper background information. 

I presume that lowering the PHP will solve most of the issues. 

Keep us posted. 

Cheers, 

Leo 

Link to comment
Share on other sites

2 minutes ago, Prestachamps said:

Hi, 

A vcouple of issues spotted

 

1. Lower your PHP from 7.4 to 7.2 - Ps .1.5.2 doesn't support the latest PHP ==> 

https://devdocs.prestashop.com/1.7/basics/installation/system-requirements/

2. Ask your host to activate either PHP x-ray or new relic on the server. 

3. Ask your host to activate for 1 H the server slow query logs . 

What they said it equals to zero! It would have been the same if I would have said about their host that s...s, without getting proper background information. 

I presume that lowering the PHP will solve most of the issues. 

Keep us posted. 

Cheers, 

Leo 

The lowest my server provides is 7.3 they are the least helpfull in activating logs too. I think i might just migrate to a VPS Hosting with root access.

Link to comment
Share on other sites

We had the same issue weeks ago with a  different client, and after almost 2 weeks of struggling we moved the site to a different server, and case was closed, as everything started working properly with the lower PHP. 

Of course the best option to keep track with Ps newest version, however before holiday season, I suppose that's not an option. 

One last question : under performance is the cache set for file or MySQL ? 

cheers, 

LEo

Link to comment
Share on other sites

2 hours ago, Prestachamps said:

We had the same issue weeks ago with a  different client, and after almost 2 weeks of struggling we moved the site to a different server, and case was closed, as everything started working properly with the lower PHP. 

Of course the best option to keep track with Ps newest version, however before holiday season, I suppose that's not an option. 

One last question : under performance is the cache set for file or MySQL ? 

cheers, 

LEo

Its set to files.

i hope thats the right settings.

thanks for all the help 😇

Link to comment
Share on other sites

The files setting is fine (I made only a connection between your high MySQL usage). 

I'm not sure what the next should be

1. start setting the Php 7.3 

2. enable profiling for your IP only.

3. under your site, each request has a TTFB of over 30 seconds. What I noticed is that the modules/appagebuilder is getting a 403 (forbiden), as well the images ===> 

are you sure that the folder rights are set properly (ask your server to use a ch Mod ). 

Important : go to the SEO and URL section and press save on that page to regenerate the htaccess.   

Cheers, 

 

Leo

 

Link to comment
Share on other sites

6 minutes ago, Prestachamps said:

The files setting is fine (I made only a connection between your high MySQL usage). 

I'm not sure what the next should be

1. start setting the Php 7.3 

2. enable profiling for your IP only.

3. under your site, each request has a TTFB of over 30 seconds. What I noticed is that the modules/appagebuilder is getting a 403 (forbiden), as well the images ===> 

are you sure that the folder rights are set properly (ask your server to use a ch Mod ). 

Important : go to the SEO and URL section and press save on that page to regenerate the htaccess.   

Cheers, 

 

Leo

 

1) switched back to 7.3

2) how can i do that i can enable profiling but not for specific ip

3) permissions are correct (755)

4) .htaccess done

still no improvement 😑

 

Link to comment
Share on other sites

1 minute ago, Prestachamps said:

Can you make a quick test pls: just add a hello.php in the public html, and add teh following into it

<html> <head> <title>PHP Test</title> </head> <body> <?php echo '<p>Hello World</p>'; ?> </body> </html>

Keep me posted (if this is slow - the issue lies on the server) 

Leo

Did This and it opens up pretty fast.

Link to comment
Share on other sites

3 minutes ago, Prestachamps said:

Hi, 

I managed to see the site finally and saw the 500 error as well. anything in the var log, or any exceptions? (please activate debug) 

Leo

 


[16-Dec-2021 17:05:37 Asia/Kolkata] PHP Notice:  Undefined index: url_name in /home4/siddhbcq/public_html/src/Core/Product/Search/Filter.php on line 100
[

The only error that fills up the error log

Link to comment
Share on other sites

12 minutes ago, Prestachamps said:

Can you send me the error log pls. The above one is only a notice.

Can you share in private also admin access with me.- would help to understand the setup as well some parts.

Have sent the message also there is this in 

var/log - *ERROR*     v1.7.5.0    2021/12/16 - 00:05:19: Link to database cannot be established: SQLSTATE[HY000] [1040] Too many connections at line 127 in file classes/db/DbPDO.php

Link to comment
Share on other sites

7 minutes ago, rushaboswal.rdx said:

Upon further talks with hosting they say there are too many high DB Quries and need to get database optimized . Still looking for an solution :)

Can you check by disable your thirdparty modules from Performance tab. and check if you are running any module which call the db query , which may made this kind of issue. You also need to clear the database visitory connection .Which will smaller the db size.

Hope this will give you a idea

 

thank you

Link to comment
Share on other sites

2 minutes ago, SmartDataSoft said:

Can you check by disable your thirdparty modules from Performance tab. and check if you are running any module which call the db query , which may made this kind of issue. You also need to clear the database visitory connection .Which will smaller the db size.

Hope this will give you a idea

 

thank you

I did try disabling it but no luck.

Also the guest tables have already been cleared.

ps_layered_price_index is the biggest table now with around 163,326.

Link to comment
Share on other sites

5 hours ago, rushaboswal.rdx said:

They did review and When contacted hosting they said too many proccess are running . thats it.

Will switching to VPS help ? 

Yes. Vps is next logical step after shared hosting.  Shared typically throttles connections and other processes, disables mod_expires is another popular one.  If they did not do this then you would have a vps.

Look for entry level vps with plesk control panel.  What is your country and budget for hosting your business?  Who is your current hosting company?  

Tip, ovh has vps with nvme ssd hardware, makes shop very fast.

 

Link to comment
Share on other sites

5 hours ago, El Patron said:

Yes. Vps is next logical step after shared hosting.  Shared typically throttles connections and other processes, disables mod_expires is another popular one.  If they did not do this then you would have a vps.

Look for entry level vps with plesk control panel.  What is your country and budget for hosting your business?  Who is your current hosting company?  

Tip, ovh has vps with nvme ssd hardware, makes shop very fast.

 

Im currently on bigrock which has 

6 CPU cores and 6 Gb ram. Currently costing around 10$ a month. Im from india and upto 30$ is fine.

Also im more familiar with cpanel. Is plesk better than cpanel?
Also i heard Ngink is faster than apache, is that true?

Link to comment
Share on other sites

10 hours ago, rushaboswal.rdx said:

Im currently on bigrock which has 

6 CPU cores and 6 Gb ram. Currently costing around 10$ a month. Im from india and upto 30$ is fine.

Also im more familiar with cpanel. Is plesk better than cpanel?
Also i heard Ngink is faster than apache, is that true?

Look to upgrade from shared with existing hosting company but I'm sure India has many hosting companies so shop around.

Plesk is better option than cpanel IMHO.  More tools.  Ngnix can benefit as you can then use php fpm. 

Link to comment
Share on other sites

14 hours ago, El Patron said:

Look to upgrade from shared with existing hosting company but I'm sure India has many hosting companies so shop around.

Plesk is better option than cpanel IMHO.  More tools.  Ngnix can benefit as you can then use php fpm. 

Thanks one last question 

i can have Nginx in both cpanel and plesk right?

Link to comment
Share on other sites

  • 2 weeks later...
Just now, ZHSoft said:

Please keep disabling third-party modules until there is no 500, and find out which module caused the 500 error.

Its not a permanent 500. 
it comes and goes, and whenever its there i mostly have too many connections in mysql (Max i can have is 151) but i dont have those many visitors at a time( This many i may have in an hour)

Link to comment
Share on other sites

Just found out i cannot switch to VPS as the bandwith they provide is 2TB, While Network traffic since startup is 9.4 TiB for my sql just for 18 days, (Which according to support team will be counted in total bandwith).

I ran debug profiler and attaching results , i also now using cloudflare to deter away bots. 

Debug profiler results attached. 

double in profiler.png

profiler 3.png

profiler 2.png

proflers1.png

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...
3 hours ago, rushaboswal.rdx said:

Still looking for help. Images taking too much time too load and loads slowly.

On the Firefox it loads quite fast. As for me. 1-1,5sec on front page. On product page is little slow, probably because zoom option. You could try also try some lazy load image module to speed it up.

  • Like 1
Link to comment
Share on other sites

1 minute ago, ComGrafPL said:

On the Firefox it loads quite fast. As for me. 1-1,5sec on front page. On product page is little slow, probably because zoom option. You could try also try some lazy load image module to speed it up.

The problem is on categories page where products images load slow . Can you check that too?

Link to comment
Share on other sites

Just now, rushaboswal.rdx said:

You are saying whole page loads in 1-2 seconds? Did you try multiple pages in same categories? Like page 1-2-3-4-5-6. For me here it takes 1-2 seconds for EACH IMAGE.

That is correct. Its load quite fast for me. Maybe try other internet browser, clear browser cache. Test your page on PageSpeed Insights and read the results https://pagespeed.web.dev , it doesn't show any big issues with loading time.

  • Thanks 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...