Forums

web2py app deployed on pythonanywhere - unable to load

I have deployed an web2py project on python anywhere(PA) through git, the installation was successful and i was able to go to home page and login. But when try to register a second user, i get no response, site continues to show loading for a long time, and then PA shows "something went wrong"..

The exact same copy is working on local host smoothly..

PA error log shows:

2014-05-30 06:31:27,529 :IOError: write error
2014-05-30 06:31:27,531 :RuntimeError: generator ignored GeneratorExit

and PA server log show:

2014-05-30 07:22:00 DAMN ! worker 1 (pid: 26509) died, killed by signal 9 :( trying respawn ...
2014-05-30 07:22:00 Respawned uWSGI worker 1 (new pid: 26593)
2014-05-30 07:22:00 spawned 2 offload threads for uWSGI worker 1
2014-05-30 07:26:53 announcing my loyalty to the Emperor...
2014-05-30 07:32:31 Fri May 30 07:32:30 2014 - *** HARAKIRI ON WORKER 1 (pid: 26593, try: 1) ***
2014-05-30 07:32:31 Fri May 30 07:32:30 2014 - HARAKIRI !!! worker 1 status !!!
2014-05-30 07:32:31 Fri May 30 07:32:30 2014 - HARAKIRI [core 0] 10.86.241.99 - GET /911_signin/default/index since    1401434849
2014-05-30 07:32:31 Fri May 30 07:32:30 2014 - HARAKIRI !!! end of worker 1 status !!!
2014-05-30 07:32:31 DAMN ! worker 1 (pid: 26593) died, killed by signal 9 :( trying respawn ...
2014-05-30 07:32:31 Respawned uWSGI worker 1 (new pid: 26630)
2014-05-30 07:32:31 spawned 2 offload threads for uWSGI worker 1

I am using web2py 1.99.7, server is Rocket 1.2.4, and database is still sqlite (same as i was using in local server), and the site works completely after cloning from git for first user that i register..

Since by default PA uses the latest version of web2py, i cloned my entire working directory having the web2py version that i was using..

To conclude the problem is : I have a copy that is working on local server, the exact same copy works only for the first user that i register, but as soon as someone else tries to register the site goes down. I am able to figure out how should i proceed to find out the problem..

Some other information: I have not configured anything about cron, database is sqlite(I am not sure why sqlite works, but it does for the first user, even after multiple login/logouts, and data is getting stored).

What's in your error log at the point where it fails?

" HARAKIRI is usually triggered when a request has taken too long (5 min). Do you get the same behaviour after a reload of the web app (i.e. can you then sign up a user and not the next one)? My guessis that your first signup is taking a really long time for some reason and that's causing your app to get killed which then gives you the "Something went wrong" "

thanks for replying, i have a few doubts... 1. Since i am not facing any problem with my local copy, i am not really sure where the problem is and which part is taking long to respond..Is there any way to measure which process is taking how much time? 2. Do server (rocket in my case), database (sqlite) have any role to play in this problem?

It could be the database, we don't recommend using sqlite for production apps on PythonAnywhere. Perhaps you could use MySQL instead?