Forums / General Questions / index.php and server overload?

index.php and server overload?

Locked

Views: 5,331

Results 1 to 20 of 24
This thread is locked. New replies are disabled.
7 Jun 2006, 5:48 PM
#1
char avatar

char

New Zenner

Join Date:
Jun 2006
Posts:
2
Plugin Contributions:
0

index.php and server overload?

I've been having issues for the last two days with my hosting company/server and website (https://www.heavenlypromises.com/shop is where my zencart is located).

For some reason, the index.php file has been causing an overload on the server, and they have had to suspend my site three times to keep the server running.

Has anyone had any issues with this kind of thing, or know why it's happening / how to keep it from happening? Currently the host has disabled my index.php file, but that really isn't a help, since without the index.php file I have no shopping cart/site! They can't seem to find any reasons why this would happen, so I'm sitting here with a site down, and no real solution.

Any help would be appreciated!

Char

7 Jun 2006, 6:41 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: index.php and server overload?

They would blame index.php because everything runs through that file.

I'd start by using FTP to download a complete copy of all the files on your site.
Then use WinMerge to compare them with your working files already on your PC. Make sure there's no corruption in any of the files and that nothing has been hacked in them.
Then do a comparison against a freshly-downloaded-and-unzipped copy of the same version of Zen Cart ... just to be sure it wasn't caused by an edit you did in your own working files. Naturally your customizations will be different, but need to be looked at carefully.

You could also ask your host if (during the time of the overload) there were any extremely-slow-running MySQL queries or excessive numbers of unclosed MySQL connections from your account?

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

7 Jun 2006, 7:11 PM
#3
tone avatar

tone

New Zenner

Join Date:
May 2006
Location:
Pleven, Bulgaria
Posts:
4
Plugin Contributions:
0

Re: index.php and server overload?

I have the same problem, from the hosting company told me that there are excessive numbers of unclosed MySQL connections from my account. How can be resolved this?

Thanks in advance!

7 Jun 2006, 7:25 PM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: index.php and server overload?

If you are using v1.3.x, you should not have a problem with unclosed connections.
If you have v1.2.4 or earlier, you may have "some" troubles.

in your configure.php files, you need to have:

define('USE_PCONNECT', 'false'); // use persistent connections?

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

7 Jun 2006, 7:37 PM
#5
tone avatar

tone

New Zenner

Join Date:
May 2006
Location:
Pleven, Bulgaria
Posts:
4
Plugin Contributions:
0

Re: index.php and server overload?

Yes I am using Zen Cart 1.3.0.1 and persistent connections are off.

7 Jun 2006, 7:38 PM
#6
merlinpa1969 avatar

merlinpa1969

Totally Zenned

Join Date:
Mar 2004
Posts:
13,031
Plugin Contributions:
4

Re: index.php and server overload?

what else are you running on your account....

zen cart closes all of its sql connections.
well zc 1.2.7 and above )

Zen cart PCI compliant Hosting

7 Jun 2006, 7:40 PM
#7
tone avatar

tone

New Zenner

Join Date:
May 2006
Location:
Pleven, Bulgaria
Posts:
4
Plugin Contributions:
0

Re: index.php and server overload?

Nothing only Zen Cart 1.3.0.1. URL removed

7 Jun 2006, 9:50 PM
#8
char avatar

char

New Zenner

Join Date:
Jun 2006
Posts:
2
Plugin Contributions:
0

Re: index.php and server overload?

I'm currently using v1.2.4. It sounds like that version might be the problem? If I upgrade to the current version, is this likely to eliminate the overload problem?

Thanks much!

8 Jun 2006, 3:51 AM
#9
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: index.php and server overload?

It's possible, but there are so many other possibilities that it can't be guaranteed.

things like:

  • what else is on your site besides Zen Cart? (forum, blog, gallery, other things)
  • what mods have you installed to Zen Cart?
  • are there any rogue files on your server that you haven't discovered yet which might be causing this bad behaviour?
  • then there's server-side issues over which you have no control, etc

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

23 Nov 2009, 12:11 AM
#10
lextechs avatar

lextechs

Zen Follower

Join Date:
Mar 2005
Location:
Tempe, AZ
Posts:
316
Plugin Contributions:
0

Re: index.php and server overload?

I am using zencart 1.3.8a and i just got a report from my server company saying that Zencart overloaded the server and suspended my account

Below is the information they sent me:

[---START REPORT---]


| Id | User | Host | db | Command | Time | State | Info |


| 694 | xxxxxxxxxxxxx | localhost | xxxxxxxxxxxxx | Sleep | 18 | | |
| 695 | xxxxxxxxxxxxx | localhost | xxxxxxxxxxxxx | Sleep | 14 | | |
| 696 | xxxxxxxxxxxxx | localhost | xxxxxxxxxxxxx | Sleep | 12 | | |
| 728 | xxxxxxxxxxxxx | localhost | xxxxxxxxxxxxx | Sleep | 9 | | |
| 741 | xxxxxxxxxxxxx | localhost | xxxxxxxxxxxxx | Sleep | 2 | | |
| 742 | xxxxxxxxxxxxx | localhost | xxxxxxxxxxxxx | Sleep | 4 | | |
| 745 | xxxxxxxxxxxxx | localhost | xxxxxxxxxxxxx | Sleep | 2 | | |
| 749 | xxxxxxxxxxxxx | localhost | xxxxxxxxxxxxx | Sleep | 2 | | |
| 750 | xxxxxxxxxxxxx | localhost | xxxxxxxxxxxxx | Sleep | 16 | | |
| 753 | xxxxxxxxxxxxx | localhost | xxxxxxxxxxxxx | Sleep | 16 | | |
| 758 | xxxxxxxxxxxxx | localhost | xxxxxxxxxxxxx | Sleep | 14 | | |
| 761 | xxxxxxxxxxxxx | localhost | xxxxxxxxxxxxx | Sleep | 11 | | |
| 768 | xxxxxxxxxxxxx | localhost | xxxxxxxxxxxxx | Sleep | 7 | | |
| 778 | xxxxxxxxxxxxx | localhost |xxxxxxxxxxxxx | Sleep | 2 | | |
| 782 | xxxxxxxxxxxxx | localhost | xxxxxxxxxxxxx | Sleep | 3 | | |
| 786 | root | localhost | | Query | 0 | | show processlist |

19:13:51 up 46 days, 2:39, 2 users, load average: 36.94, 24.82, 17.11, t = 2s

21338 R https://www.lextechs.com 61.43% 1.40s GET /tnaimpactps3-p-17505.html HTTP/1.1
21124 R https://www.lextechs.com 50.91% 1.65s GET /ext25singlebaysatausb-p-47705.html HTTP/1.1
20205 R https://www.lextechs.com 33.19% 4.70s GET /sbxfigo-p-62235.html HTTP/1.0
20155 R https://www.lextechs.com 29.96% 4.74s GET /35alumsatatousb20encl-p-47492.html HTTP/1.1
17279 R https://www.lextechs.com 27.03% 7.99s GET /audiovoxaudiovoxdatacableforgzoneboulderc711-p-33201.html HTTP/1.0
20206 R https://www.lextechs.com 20.22% 13.65s GET /max4hdd35satarack-p-46552.html HTTP/1.1
17128 R https://www.lextechs.com 18.12% 17.38s GET /trayless35satainternal-p-47301.html HTTP/1.1
21139 R https://www.lextechs.com 17.10% 27.13s GET /ext25singlebaysatausb-p-48046.html HTTP/1.1
17282 R https://www.lextechs.com 16.69% 30.14s GET /truthb2030pstudiomonitor-p-24815.html HTTP/1.1
17278 R https://www.lextechs.com 16.27% 46.83s GET /pdpnerflicensedarmorcasefornintendodslite-p-29356.html HTTP/1.0
17124 R https://www.lextechs.com 14.85% 21.48s GET /satahddmobilerack-p-48178.html HTTP/1.1
21138 R https://www.lextechs.com 14.71% 20.05s GET /audiovoxaudiovoxdatacableforgzoneboulderc711-p-33201.html HTTP/1.0
17264 R https://www.lextechs.com 13.19% 46.39s GET /wirelesskeyboard6000usb-p-44370.html HTTP/1.1
17129 R https://www.lextechs.com 13.00% 24.08s GET /pdpnerflicensedarmorcasefornintendodslite-p-29356.html HTTP/1.0
18168 R https://www.lextechs.com 12.96% 49.92s GET /audiovoxaudiovoxdatacableforgzoneboulderc711-p-33201.html HTTP/1.0
20230 R https://www.lextechs.com 12.65% 43.39s GET /24ghzmultimediakeyboard-p-46066.html HTTP/1.1
20153 R https://www.lextechs.com 12.49% 57.17s GET /tripplitewirelessmultimediaflexiblekeyboard-p-43262.html HTTP/1.1
20216 R https://www.lextechs.com 12.36% 49.27s GET /batteryvideolightvl10liii-p-10143.html HTTP/1.1
20203 R https://www.lextechs.com 12.01% 55.87s GET /wirelesskeyboardk340-p-53206.html HTTP/1.1
21086 R https://www.lextechs.com 11.24% 40.58s GET /go24seriesfullsizekb-p-49737.html HTTP/1.1
21135 R https://www.lextechs.com 11.04% 36.95s GET /wirelesskeyboardk350-p-53205.html HTTP/1.1
19826 R https://www.lextechs.com 10.67% 70.85s GET /audiovoxaudiovoxdatacableforgzoneboulderc711-p-33201.html HTTP/1.0
17122 R https://www.lextechs.com 10.62% 69.29s GET /pro2000cordlesskeyboardwb-p-46601.html HTTP/1.1
20217 R https://www.lextechs.com 9.50% 60.42s GET /24ghzwirelesskeyboard-p-49355.html HTTP/1.1

[---END REPORT---]

These are the question they asked me can anyone answer them

"Hello,

We can get this fixed, all of the log information is in the abuse notice. What's happening is that your mySQL queries are not being closed by ZenCart, they're sitting waiting for something to happen. There are a few things that could cause this.

  1. Using mysql_pconnect instead of mysql_connect. Is ZenCart set up to use persistent connections?
  2. Refreshing pages constantly. Are you, or possibly any of your customers, refreshing pages?
  3. Connection flood. Have you experienced any increase in traffic lately?
  4. mySQL code injection attempts. Are you running the latest version of ZenCart?"

Lextechs.com Powered By ZenCart

23 Nov 2009, 1:56 AM
#11
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,684
Plugin Contributions:
0

Re: index.php and server overload?

... and the answers to the questions your host asked you? (Same questions we would have, especially if you have been running the site successfully for a while)

Please do not PM for support issues: a private solution doesn't benefit the community.

Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

23 Nov 2009, 2:18 AM
#12
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: index.php and server overload?

FYI, since v1.2.4, Zen Cart does not use persistent connections at all, regardless of the setting in your configure.php files.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

23 Nov 2009, 2:12 PM
#13
lextechs avatar

lextechs

Zen Follower

Join Date:
Mar 2005
Location:
Tempe, AZ
Posts:
316
Plugin Contributions:
0

Re: index.php and server overload?

Kim:

... and the answers to the questions your host asked you? (Same questions we would have, especially if you have been running the site successfully for a while)

  1. Using mysql_pconnect instead of mysql_connect. Is ZenCart set up to use persistent connections?,

I am not sure if i am using this how would be able to find out in the Zencart config file?

  1. Refreshing pages constantly. Are you, or possibly any of your customers, refreshing pages?

I am not doing any page refreshing however i have no clue if my customers are or not

  1. Connection flood. Have you experienced any increase in traffic lately?
    I would have to log in to my account and see that however the account has been suspended so i can not get that information. However this is what they are telling me
    "Hello,

The zencart on lextechs.com specifically was causing the server to be overloaded. This may have been caused by an exploit to zencart which do exist or heavily increased traffic to the site. At this time I do not believe we can reenable your site with that zencart still online unless it is moved to a vps or fixed."

"Hello,

You'll need to contact ZenCart about this issue and see if there are any known issues with ZenCart. We cannot provide script debugging support."

"Hello,

It looks like you are just getting too much traffic to be on a shared hosting platform. You need to upgrade to a VPS. The issue isn't with the disk space and bandwidth, it's that you're using too much CPU time. On a VPS you have a very large slice of the CPU all to yourself, so you would not have these issues."

  1. mySQL code injection attempts. Are you running the latest version of ZenCart?" I am running 1.3.8a

Lextechs.com Powered By ZenCart

23 Nov 2009, 3:45 PM
#14
data_digger avatar

data_digger

Zen Follower

Join Date:
Jan 2009
Posts:
222
Plugin Contributions:
2

Re: index.php and server overload?

Hosting company should be able to tell You if Your traffic isn't normal.

Is this new site or old one? How many products You have? Have You added many products/categories/manufacturers/images recently? Maybe You installed some module recently?

23 Nov 2009, 3:48 PM
#15
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,684
Plugin Contributions:
0

Re: index.php and server overload?

Also - who is your host?
And have you applied the Security patch posted back in June?

Please do not PM for support issues: a private solution doesn't benefit the community.

Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

23 Nov 2009, 7:23 PM
#16
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: index.php and server overload?

Since you decided to post your issue in someone else's thread, I would hope that you actually read through the thread and considered the suggestions given to the previous poster.
However, I see no evidence in your post which suggests you've done anything to inspect the root cause yourself.
ie: what happened when you followed my suggestions posted as the first reply to the original poster?

DrByte:

I'd start by using FTP to download a complete copy of all the files on your site.
Then use WinMerge to compare them with your working files already on your PC. Make sure there's no corruption in any of the files and that nothing has been hacked in them.
Then do a comparison against a freshly-downloaded-and-unzipped copy of the same version of Zen Cart ... just to be sure it wasn't caused by an edit you did in your own working files. Naturally your customizations will be different, but need to be looked at carefully.

You could also ask your host if (during the time of the overload) there were any extremely-slow-running MySQL queries or excessive numbers of unclosed MySQL connections from your account?
Also, as Kim mentioned, is your site fully patched? All forum members were emailed about an important security patch back in June 2009.
And, a list of important patches is prominently posted in the News area, as well as at the top of every forum section.

Also, I notice that all the URLs from the logs you posted, are not standard URLs generated by Zen Cart. Thus, you've got some sort of addon involved too. Perhaps turning that off, and maybe several others too, might help you isolate where some of the performance bottlenecks are for you.

If your hosting account has NOT been having these performance problems previously, then you've likely installed an addon that's causing you problems, or you've been hacked.
Only you can figure that part out.

http://www.zen-cart.com/wiki/index.php/Recovering_From_Hacks

It could also be that you've been having these problems all along, causing some server problems for the hosting company, and maybe the hosting company has just recently turned on some performance monitoring and your site suddenly came up in their first analysis, thus making you their first candidate to slap around. Either way, you'll need to narrow down the problem by working up a list of differences between your site and a brand new clean uncustomized install, and sort out whatever you've got that's breaking things.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

23 Nov 2009, 7:36 PM
#17
lextechs avatar

lextechs

Zen Follower

Join Date:
Mar 2005
Location:
Tempe, AZ
Posts:
316
Plugin Contributions:
0

Re: index.php and server overload?

Kim:

Also - who is your host?
And have you applied the Security patch posted back in June?

hosting company is hostforweb.com. yes i applied the new patch when the zencart admin told me i was not up date and a new patch was needed back when it first came out.

Lextechs.com Powered By ZenCart

23 Nov 2009, 7:41 PM
#18
lextechs avatar

lextechs

Zen Follower

Join Date:
Mar 2005
Location:
Tempe, AZ
Posts:
316
Plugin Contributions:
0

Re: index.php and server overload?

DrByte:

Since you decided to post your issue in someone else's thread, I would hope that you actually read through the thread and considered the suggestions given to the previous poster.
However, I see no evidence in your post which suggests you've done anything to inspect the root cause yourself.
ie: what happened when you followed my suggestions posted as the first reply to the original poster?

Also, as Kim mentioned, is your site fully patched? All forum members were emailed about an important security patch back in June 2009.
And, a list of important patches is prominently posted in the News area, as well as at the top of every forum section.

Also, I notice that all the URLs from the logs you posted, are not standard URLs generated by Zen Cart. Thus, you've got some sort of addon involved too. Perhaps turning that off, and maybe several others too, might help you isolate where some of the performance bottlenecks are for you.

If your hosting account has NOT been having these performance problems previously, then you've likely installed an addon that's causing you problems, or you've been hacked.
Only you can figure that part out.

http://www.zen-cart.com/wiki/index.php/Recovering_From_Hacks

It could also be that you've been having these problems all along, causing some server problems for the hosting company, and maybe the hosting company has just recently turned on some performance monitoring and your site suddenly came up in their first analysis, thus making you their first candidate to slap around. Either way, you'll need to narrow down the problem by working up a list of differences between your site and a brand new clean uncustomized install, and sort out whatever you've got that's breaking things.

i was not aware that threads with similar problems are only for the person having the problem. I read this thread and it seems the closet to what problem i am having if it is not by all means remove my thread and place in the respective area of the forum.

Thanks for you help, i decided the VPS might be a better move for now, since there seem to be no clear answer.

Lextechs.com Powered By ZenCart

23 Nov 2009, 7:44 PM
#19
lextechs avatar

lextechs

Zen Follower

Join Date:
Mar 2005
Location:
Tempe, AZ
Posts:
316
Plugin Contributions:
0

Re: index.php and server overload?

data_digger:

Hosting company should be able to tell You if Your traffic isn't normal.

Is this new site or old one? How many products You have? Have You added many products/categories/manufacturers/images recently? Maybe You installed some module recently?

this site has being running on this hosting company for 3-4 year now. I have a direct feed from my distributors that uploads products and categories daily. There are no new modules every thing have always been there on the site

Lextechs.com Powered By ZenCart

23 Nov 2009, 8:13 PM
#20
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: index.php and server overload?

lextechs:

i was not aware that threads with similar problems are only for the person having the problem. I read this thread and it seems the closet to what problem i am having if it is not by all means remove my thread and place in the respective area of the forum.
You missed my point.

I was identifying the fact that suggestions were made, and you didn't indicate whether you had used those same suggestions for your situation, which you acknowledged seemed "close" enough to theirs.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.