Is there any alternative to Pythonanywhere hosting?

1,015 views
Skip to first unread message

Joe

unread,
Aug 13, 2015, 11:38:24 PM8/13/15
to web2py-users
I am using Pythonanywhwere and having some problems. Can anyone recommend an other hosting for web2py apps where the support understands the web2py framework and they can actually fix problems when needed?

JorgeH

unread,
Aug 13, 2015, 11:55:10 PM8/13/15
to web2py-users
what sort of problems are you having?

I have used pythonanywhere for long time with no problems whatsoever.

webfaction is an alternative.

Joe

unread,
Aug 14, 2015, 12:45:07 AM8/14/15
to web2py-users
Thanks for your reply Jorge,

I have been using Pythonanywhere for a long time as well, hosting 2 very simple web2py sites there with no problem.

However, now I am trying to deploy a more complex app there and I have been experiencing some issues. I finally uploaded the app using sftp because the app was too big to install using the admin.

This is the problem I am having now: I am trying to connect this newly installed app to the mysql database, as I did my very first app there a long time ago. My first app was very easy to connect to mysql, I just replaced the db = DAL() line of code in the wen2py app and it still works fine. However, I did the same thing with my new app and it breaks. The error ticket is not showing anything and in the error log I found this: ERROR:root:RuntimeError: generator ignored GeneratorExit but this may or may not be the relevant error msg as it's reffering to their loadbalancer.

The support advised me this: "You could try codementor (there's a link at the top of the main Forum page) for focussed help." ...This support answer makes me a little bit uncomfortable.

I am kind of new and I am definitely not an expert in web2py or Pythonanywhere. In one of their earlier answers they said that they are not "web2py experts" and I think I would be happier if they were, although my problem now is not a web2py issue. My app works flawlessly, in the development environment on my computer, thanks to web2py. My app actually works on pythonanywhere as well as long as I don't try to change this line: db = DAL('sqlite://storage.sqlite',pool_size=1,check_reserved=['all']). So, the app works on sqlite but I can't connect to their mysql database. This is not a web2py issue. I think it might be because the app is too big, over 800MB, but I am not sure.

Annet

unread,
Aug 14, 2015, 1:06:50 AM8/14/15
to web2py-users
Hi Joe,

I host my appliaction at Webfaction and had a similar issue, support advised me to set pool_size = 0
pool_size = 1 conflicted with a setting outside web2py.


Kind regads,

Annet

Oli

unread,
Aug 14, 2015, 3:09:01 AM8/14/15
to web2py-users

Am Freitag, 14. August 2015 05:38:24 UTC+2 schrieb Joe:
I am using Pythonanywhwere and having some problems. Can anyone recommend an other hosting for web2py apps where the support understands the web2py framework and they can actually fix problems when needed?
 
I put my big apps in an Cloudstore and use wget to load the apps on pythonanywhere.
 

Joe

unread,
Aug 14, 2015, 3:28:03 AM8/14/15
to web2py-users
Is that because you had an issue with your bigger apps on pythonanywhere? If so, how did you realize that the app size was the problem? I am still trying figure out what the problem is with my app.

Joe

unread,
Aug 14, 2015, 3:29:30 AM8/14/15
to web2py-users
Thanks Annet, did you ever work out that issue with Webfaction?

Oli

unread,
Aug 14, 2015, 5:05:16 AM8/14/15
to web2py-users
the Upload with the "web2py admin Interface" is limited. This is not a Limit from web2py
 

Joe

unread,
Aug 14, 2015, 5:21:07 AM8/14/15
to web2py-users
Yes, I know, so what I did was, I uploaded my app folder to pythonanywhere using sftp and that works. I can run the app but only if I  use sqlite db, I can't connect to the mysql. That's my problem.

Annet

unread,
Aug 14, 2015, 12:34:10 PM8/14/15
to web...@googlegroups.com
Hi Joe


Thanks Annet, did you ever work out that issue with Webfaction?

Not really, setting the pool-size from 1 to 0 just solved the issue,
I didn't take the time to figure out why.

I have no experience with pythonanywhere. So far all issues I had with
deploying my applications have been solved by Webfaction's support
people.


Are you sure your connection string is correct:

db = DAL('mysql://user_name:pass...@mysql.server/user_name$database_name')


The loadbalancer times out when it can't connect the database.


Kind regards,

Annet

DaneW

unread,
Aug 16, 2015, 4:43:21 PM8/16/15
to web2py-users
I've been using PythonAnywhere happily for over 2 years. The database (now with over 12m records) has worked perfectly under SQLite and later MySQL - although I do get error 1226 about exceeding max_user_connections every so often.

In the db.py model I have  db = DAL('mysql://aaa:b...@mysql.server/ccc$db1',pool_size=0,lazy_tables=True,check_reserved=['all'])  - where aaa is my user name, bbb is my MySQL password and ccc$db1 is my database name.

I used to have pool_size=1 but in the light of Annet's suggestion I've changed it to 0 and it seems to be working ok. Also PythonAnywhere are saying that recent infrastructure changes mean that we should alter mysql.server to *yourusername*.mysql.pythonanywhere-services.com but that results in my website crashing immediately so I've left it as it used to be for the time being.



Massimo Di Pierro

unread,
Aug 16, 2015, 6:50:03 PM8/16/15
to web2py-users
I would talk to them. They are very supporting. Anyway that said. You can use any hosting you want. I use Python Anywhere, Digital Ocean, Google App Engine, and Google Managed VM (with Docker) for different projects.


On Sunday, 16 August 2015 15:43:21 UTC-5, DaneW wrote:
I've been using PythonAnywhere happily for over 2 years. The database (now with over 12m records) has worked perfectly under SQLite and later MySQL - although I do get error 1226 about exceeding max_user_connections every so often.

In the db.py model I have  db = DAL('mysql://aaa:bbb@mysql.server/ccc$db1',pool_size=0,lazy_tables=True,check_reserved=['all'])  - where aaa is my user name, bbb is my MySQL password and ccc$db1 is my database name.

Joe

unread,
Aug 18, 2015, 2:37:18 AM8/18/15
to web2py-users
Thanks for your reply Massimo, yes, I have a couple of web2py apps with Pythonanywhere for about a year now and I had no problems with them. However, it seems impossible to correctly connect my new app to mysql on Pythonanywhere I am giving up on this because I have been trying for over a week and I am not getting anywhere. I have been going back and forth with their support on their forum but we can't find an answer.

The app is up on their server and works fine with sqlite but not with mysql.

Joe

unread,
Aug 18, 2015, 2:50:45 AM8/18/15
to web...@googlegroups.com
Thanks for your reply Dane,

For my other 2 apps hosted with Pythonanywhere, which are working fine, I have been using this in my db.py model:
db = DAL('mysql://aaa:bbb@bbb.mysql.pythonanywhere-services.com/ccc$mydbname')

My new app, however is not working with this code. I just tried the code you posted and I get the same result as with the code above. Not working. My new app works with SQlite on their server but, after a week of trying just about everything, it seems impossible to properly connect to the mysql. Needless to say I am very frustrated, I have been developing this app for 3 month and I don't even have a theory of what could possible be the problem.

Thanks very much for your help. If you have any other ideas please let me know.


On Monday, August 17, 2015 at 4:43:21 AM UTC+8, DaneW wrote:
I've been using PythonAnywhere happily for over 2 years. The database (now with over 12m records) has worked perfectly under SQLite and later MySQL - although I do get error 1226 about exceeding max_user_connections every so often.

In the db.py model I have  db = DAL('mysql://aaa:bbb@mysql.server/ccc$db1',pool_size=0,lazy_tables=True,check_reserved=['all'])  - where aaa is my user name, bbb is my MySQL password and ccc$db1 is my database name.

Joe

unread,
Aug 18, 2015, 4:14:59 AM8/18/15
to web2py-users
The issue is that when I connect the app to the mysql and I check the database administration interface, the tables are all there as expected, but all the records are missing. The app was uploaded to Pyuthonanywhere using sftp because Pythonanywhere has a app size limit for the admin interface upload. In any case, all the records were uploaded, I can run the app using sqlite but they are not showing up on the mysql.

Any help would be greatly appreciated.


On Monday, August 17, 2015 at 6:50:03 AM UTC+8, Massimo Di Pierro wrote:

Glenn Jones

unread,
Aug 18, 2015, 4:56:54 AM8/18/15
to web2py-users
Hi Joe,

PythonAnywhere dev here (glenn on the Forums). Are you the guy I was talking to in the forum thread titled "Web2py app connecting to mysql database"? If you are, do you mind if I chime in to this with some of the details we worked out to give the web2py guys a little more to work on?

Joe

unread,
Aug 18, 2015, 5:14:54 AM8/18/15
to web2py-users
Hi Glenn, Yes, that's me.
Of course, I would be happy if you could help me out here as well!
Thanks very much, I appreciate it!

Glenn Jones

unread,
Aug 18, 2015, 8:52:24 AM8/18/15
to web2py-users
That sounds like you are connecting to the database, you're just not seeing the data you expect. How did you transfer the data from sqlite to MySQL?

Joe

unread,
Aug 23, 2015, 10:49:12 PM8/23/15
to web2py-users
Yes, now I can connect but I wasn't able to connect before. First, I couldn't upload the packaged app using the admin interface because I didn't know about PythonAnywhere's app size upload limit. Then, after I uploaded the app using sftp I was getting the error messages every time I tried a new code to connect to mysql. I don't have a lot of experience, I learn as I go.

Now, that I can connect to mysql, I tried a couple of different things to transfer/migrate the data but I don't know enough to make it work. The data is videos and images so I can't use a CSV file to transfer it and migrating  the records one table at the time to rebuild meta data is way over my head. However, now at least I can connect to the database so what I have to do is to insert all the records again manually to the mysql.

Thanks for your help and please kindly understand that because I am just learning this process, I often need a bit more support than the experienced developers.

Thanks again.

Cheers,

Joe

Derek

unread,
Aug 26, 2015, 11:37:33 AM8/26/15
to web2py-users
You could open a connection to both databases then copy the data over that way. That's what my day job is, transferring data, ETL.
Reply all
Reply to author
Forward
0 new messages