Hi Thomas,

Thanks for the reply.

I have postgres max_connections=100, but when I run "select count(*)
from pg_stat_activity;" I only get 2.  So I would think that I'm not
maxing out the connections. (is that right -- I'm fairly new to
Postgres)

Here are the results from an strace:

# pgrep apache2
32555
32557
32561
32564
32565
32566
32568
32570
32600
32601
32630
32632
32633
r...@domu-12-31-39-03-3e-22:~# strace -p 32555
Process 32555 attached - interrupt to quit
select(0, NULL, NULL, NULL, {0, 480000}) = 0 (Timeout)
waitpid(-1, 0xbf879bd8, WNOHANG|WSTOPPED) = 0
select(0, NULL, NULL, NULL, {1, 0})     = 0 (Timeout)
waitpid(-1, 0xbf879bd8, WNOHANG|WSTOPPED) = 0
select(0, NULL, NULL, NULL, {1, 0})     = 0 (Timeout)
waitpid(-1, 0xbf879bd8, WNOHANG|WSTOPPED) = 0
select(0, NULL, NULL, NULL, {1, 0})     = 0 (Timeout)
waitpid(-1, 0xbf879bd8, WNOHANG|WSTOPPED) = 0
select(0, NULL, NULL, NULL, {1, 0})     = 0 (Timeout)
waitpid(-1, 0xbf879bd8, WNOHANG|WSTOPPED) = 0
select(0, NULL, NULL, NULL, {1, 0})     = 0 (Timeout)
waitpid(-1, 0xbf879bd8, WNOHANG|WSTOPPED) = 0
select(0, NULL, NULL, NULL, {1, 0})     = 0 (Timeout)
waitpid(-1, 0xbf879bd8, WNOHANG|WSTOPPED) = 0
select(0, NULL, NULL, NULL, {1, 0})     = 0 (Timeout)
waitpid(-1, 0xbf879bd8, WNOHANG|WSTOPPED) = 0
select(0, NULL, NULL, NULL, {1, 0})     = 0 (Timeout)
waitpid(-1, 0xbf879bd8, WNOHANG|WSTOPPED) = 0
select(0, NULL, NULL, NULL, {1, 0})     = 0 (Timeout)
waitpid(-1, 0xbf879bd8, WNOHANG|WSTOPPED) = 0
select(0, NULL, NULL, NULL, {1, 0})     = 0 (Timeout)
waitpid(-1, 0xbf879bd8, WNOHANG|WSTOPPED) = 0
select(0, NULL, NULL, NULL, {1, 0})     = 0 (Timeout)

Does any of this help?

Erik

On Aug 19, 8:09 am, Thomas Guettler <h...@tbz-pariv.de> wrote:
> Just a first guess:
>
> How many wsgi-clients access the db server at the same time?
> Maybe the db does accept only N, while apache/wsgi tries it
> with N+1. Then the connection could hang.
>
> What do the wsgi processes do? You can use "strace -p WSGI-PID" to find
> this out.
>
> You can sent SIGINT (like ctrl-c) the the PID. In the stacktrace
> you can see where the python code was hanging (should be in apache
> error log).
>
>  HTH,
>    Thomas
>
> erikcw schrieb:
>
>
>
> > Hi,
>
> > I'm running Django through mod_wsgi and Apache (2.2.8) on Ubuntu 8.04.
>
> > I've been running Django on this setup for about 6 months without any
> > problems. Yesterday, I moved my database (postgres 8.3) to its own
> > server, and my Django site started refusing to load (the browser
> > spinner would just keep spinning).
>
> > Pages will load when I first start apache, but after about 10 mintues,
> > it just stops. Apache is still able to serve static files. Just
> > nothing through Django.
>
> > I've checked the apache error logs, and I don't see any entries that
> > could be related. I'm not sure if this is a WSGI, Django, Apache, or
> > Postgres issue?
>
> --
> Thomas Guettler,http://www.thomas-guettler.de/
> E-Mail: guettli (*) thomas-guettler + de
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to