web2py freezing

93 views
Skip to first unread message

Candid

unread,
Jun 30, 2010, 5:06:42 PM6/30/10
to web2py-users
I am using web2py in my organization for internal applications. One of
the applications uses dedicated instance of web2py (v1.78.1) running
on dedicated ubuntu server. It connects to our SQL Server 2005
database via freetds. It runs with the following parameters:

python web2py.py -i ... -p ... -a ... -n 100 -q 100

The application uses connection pool with 50 connections.

Recently it has started freezing occasionally. The weird thing is that
the whole web2py server freezes and basically stops responding, so not
only you cannot access the app, you cannot even open the admin
console. Sometimes it starts working again after a few minutes,
sometimes I have to restart web2py.
I suspect it has something to with either web server threads not
getting released or databases connections not getting returned to the
pool (the latter would not explain why I cannot access admin console
though).

Has anyone had similar issues? Any suggestions on how to troubleshoot
the problem? Any input would be highly appreciated.

mdipierro

unread,
Jul 1, 2010, 1:28:36 AM7/1/10
to web2py-users
Can you check memory usage when it freezes? Is there anything in the
db log about too many connections?

Candid

unread,
Jul 1, 2010, 12:13:19 PM7/1/10
to web2py-users
I will check memory usage next time it freezes but I am pretty sure
it's OK.
What do you mean by db log?

Also, am I missing something or rocket should close the connections if
request is taking longer than 10 seconds (default timeout)? So if I
put time.sleep(20) in my controller it should times out? That's not
what's happening - the controller waits all those 20 seconds and
returns without any errors. Am I misunderstanding the timeout option?

Candid

unread,
Jul 1, 2010, 12:26:05 PM7/1/10
to web2py-users
Here is Massimo's reply (sorry, I accidently hit "Reply to author"
button last time):

> I am not familiar with SQLserver 2005 but probably it has a log file where to store errors. If it running out of connections it
> should say so there.
> let me know.

No, the db server itself is fine. We have many other systems relying
on this server and they work fine.

Rowdy

unread,
Jul 2, 2010, 4:52:16 AM7/2/10
to web...@googlegroups.com

Greetings,

I have a web2py application running in 1.76.5 (from source, and haven't
had the chance to test the app in a more recent version of web2py).

The server is running vanilla Ubuntu 7.10 with all the patches up to
when support and security updates stopped.

Every now and again there is a "BUG: unable to handle kernel paging
request at virtual address b79b3000", always in the web2py Python
process, and web2py more or less hangs.

Actually XML-RPC calls timeout, web pages do not load, but the web2py
internal cron keeps working and generating more Python processes (each
of which also seems to hang).

I need to kill -9 the processes and start it again.

This did not happen at all during the previous 4 months of development
on the same server, and does not happen at all in another NetBSD-based
server that I have setup as a development/test environment.

For various other reasons a replacement server is being commissioned at
the moment, so restarting web2py every couple of days suffices for me
for now.

Rowdy

mdipierro

unread,
Jul 2, 2010, 6:08:09 AM7/2/10
to web2py-users
Do you see any issue with memory usage?

Candid

unread,
Jul 2, 2010, 8:44:10 AM7/2/10
to web2py-users
> Every now and again there is a "BUG: unable to handle kernel paging
> request at virtual address b79b3000", always in the web2py Python
> process, and web2py more or less hangs.

Where do you see this error message?

mdipierro

unread,
Jul 2, 2010, 9:44:20 AM7/2/10
to web2py-users
please upgrade to 1.79.2 and see if you still get the problem.

Massimo



On 2 Lug, 03:52, Rowdy <ro...@netspace.net.au> wrote:
>

Candid

unread,
Jul 2, 2010, 2:27:15 PM7/2/10
to web2py-users
Can anyone shed light on this question:

Also, am I missing something or rocket should close the connections
if
request is taking longer than 10 seconds (default timeout)? So if I
put time.sleep(20) in my controller it should times out? That's not
what's happening - the controller waits all those 20 seconds and
returns without any errors. Am I misunderstanding the timeout option?

On Jul 1, 12:13 pm, Candid <roman.bat...@gmail.com> wrote:

Rowdy

unread,
Jul 3, 2010, 3:27:21 AM7/3/10
to web...@googlegroups.com
mdipierro wrote:
> Do you see any issue with memory usage?
>

Overall it is difficult to tell as the server runs a few large
processes, including several big Java processes and a number of other
Python daemons, so overall memory usage (which is being graphed by
Cacti) is a bit all over the place anyway.

Should I be looking at the web2py Python process in particular? if so I
can have a peek next time the server oops, as it happens fairly
regularly.

Rowdy

Rowdy

unread,
Jul 3, 2010, 3:28:40 AM7/3/10
to web...@googlegroups.com
Candid wrote:
>> Every now and again there is a "BUG: unable to handle kernel paging
>> request at virtual address b79b3000", always in the web2py Python
>> process, and web2py more or less hangs.
>
> Where do you see this error message?
>

In /var/log/syslog.

I usually `grep Oops /var/log/syslog` to see when and how often the oops
occurs - so far it has only been the web2py Python process.

Rowdy

Rowdy

unread,
Jul 3, 2010, 3:34:51 AM7/3/10
to web...@googlegroups.com
mdipierro wrote:
> please upgrade to 1.79.2 and see if you still get the problem.
>
> Massimo

This is a production system and downtime would be troublesome - are
there any differences between 1.76.5 and 1.79.2 that I should be aware
of? I have cron jobs, XML-RPC functions and a bunch of data entry pages
using CRUD, SQLFORM and a few custom forms.

The only reason I haven't had a chance to upgrade so far is lack of time
to test the app in more recent versions of web2py.

Thanx

Rowdy

mdipierro

unread,
Jul 3, 2010, 4:15:38 AM7/3/10
to web2py-users
It should be completely backward compatible. Without the new version
is difficult for me to help debug the problem.

Rowdy

unread,
Jul 6, 2010, 6:19:23 PM7/6/10
to web...@googlegroups.com
mdipierro wrote:
> It should be completely backward compatible. Without the new version
> is difficult for me to help debug the problem.

I would like to follow up on this, but I have been moved onto another
project for a while. It also seems that the replacement server is on
hold too, so I have argued the case for upgrading web2py, but was told
that it was a lower priority. *sigh*

Rowdy

Reply all
Reply to author
Forward
0 new messages