PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
Nathaniel
Forum Contributor
Posts: 396 Joined: Wed Aug 31, 2005 5:58 pm
Location: Arkansas, USA
Post
by Nathaniel » Mon Feb 26, 2007 12:09 pm
Hello,
I have a client which I just finished a site for. He started marketing, and now his site is crashing.
"Internal Server Error - Process limit exceeded for uid 11147"
What does this mean? Is this the MySQL processes? (Somehow I got this in my head, but I can't remember how.)
The support email seemed to state that it's because a script is hanging, but if so, how do I know which one?
- Nathaniel
feyd
Neighborhood Spidermoddy
Posts: 31559 Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA
Post
by feyd » Mon Feb 26, 2007 1:09 pm
Add logging at various points. Analyze the data as it comes in, add more logging where things look suspicious then repeat.
volka
DevNet Evangelist
Posts: 8391 Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger
Post
by volka » Mon Feb 26, 2007 1:15 pm
I guess the client is using cgi, i.e. each time a request is handled a new process is started. And this process does not stop.
On an unxi-style machine you can use ps to show all processes attached to an uid
e.g.
Code: Select all
ps -o uid,user,pid,ppid,args -u 11147see
http://opengroup.org/onlinepubs/007908799/xcu/ps.html
Nathaniel
Forum Contributor
Posts: 396 Joined: Wed Aug 31, 2005 5:58 pm
Location: Arkansas, USA
Post
by Nathaniel » Mon Feb 26, 2007 1:45 pm
Thank you feyd and volka.
Yes, this hosting company is running php as a cgi module. They don't give us shell access, so I can't run "ps", but thanks anyway volka!
feyd, I'm not sure what I'm supposed to log. Would you please elaborate?
Thanks,
- Nathaniel
pickle
Briney Mod
Posts: 6445 Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:
Post
by pickle » Mon Feb 26, 2007 1:50 pm
Some hosting companies still allow your scripts to run shell commands. Just wrap what ~volka said in
shell_exec() .
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
Nathaniel
Forum Contributor
Posts: 396 Joined: Wed Aug 31, 2005 5:58 pm
Location: Arkansas, USA
Post
by Nathaniel » Mon Feb 26, 2007 2:07 pm
Thanks pickle! That works a charm.
It appears that the hosting company finally fixed it, (before I could run that unix command, no less), so I'll have a chat with my client and see if the host emailed him any information about how they resolved it.
Cheers guys,
- Nathaniel