Hi,

> I have big problem. For a few days my site isn't working properly. We
> have two interfaces. First connected to Apache, second is cron job
> running every 10 minutes (using Django ORM etc.). The problem is when
> that job is running, there is some ExclusiveLock on postgres and web
> interface have some lags, big lags. It's just like site stops working
> for 1-2 minutes when there is cron job running. Any hints?

Not knowing what your cron job does, it's hard to provide any concrete
advice. You should read through and understand PGSQL's locking
mechanisms: http://www.postgresql.org/docs/8.3/static/mvcc.html

It may be that this is not a locking issue but a resource
unavailability issue. For example, if the cron job takes up most of
the CPU, that alone would slow down other processes. Similarly, if it
consumes a lot of memory, the rest of the processes could swap to a
crawl. Take another look at the cron job to see if it's demanding too
much from PGSQL or from the server's other resources.

Also, you should set PGSQL in debug mode and study your logs and look
for some initial clues there.

-Rajesh D

--~--~---------~--~----~------------~-------~--~----~
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