Re: [web2py] Re: SOAP Access

2010-07-21 Thread Mariano Reingart
Maybe a custom, simple and flexible solution is enought, http://code.google.com/p/pysimplesoap/wiki/Web2Py I commented this some time ago (client side), but now looking at the server side, just developed some experimental code with web2py extending Service infrastructure. I posted further

[web2py] Re: Error in wsgi/apache

2010-07-21 Thread Michael Toomim
Ah, preventing multithreading is a good idea to try too. It wasn't a file descriptor problem either, I had Files used: 1376 out of 75556 On Jul 20, 9:14 pm, Graham Dumpleton graham.dumple...@gmail.com wrote: On Jul 21, 1:41 pm, Michael Toomim too...@gmail.com wrote: I'm using daemon mode...

[web2py] Re: Multiples ajax forms (with LOAD). It is possible?

2010-07-21 Thread mdipierro
will look into this.. it must be a JS issue. On Jul 20, 9:10 pm, ionel ionelanton...@gmail.com wrote: Hello, I try to add two ajax forms into a page with something like this: {{=LOAD(url=URL(r=request,f='add_person.load'), ajax=True)}} {{=LOAD(url=URL(r=request,f='add_image.load'),

[web2py] Re: Customizing auth.login form to specify class or id other than default value

2010-07-21 Thread Abhinav S
Okay, I am trying to do the same thing and I employed the method suggested by Mr.Freeze but I'm still stuck.. here's my code : http://pastebin.com/8kbLJiG0 I can't even change the default value of the input field. what am I doing wrong here? On Jul 19, 8:50 pm, mr.freeze nat...@freezable.com

[web2py] Re: generic.load question

2010-07-21 Thread mdipierro
It is a bug. I think I fixed it in trunk. Please check it. Massimo On Jul 21, 1:52 am, Rob r...@rmdashr.com wrote: views/item/index.html: {{extend 'layout.html'}} h1This is the item/index.html template/h1 {{=LOAD(request.controller,'p_view_list.load')}} views/p_view_list.html: {{extend

[web2py] Re: generic.load question

2010-07-21 Thread mdipierro
Anyway... even with the bug it should work if you set ajax=True which is the most typical use case. On Jul 21, 1:52 am, Rob r...@rmdashr.com wrote: views/item/index.html: {{extend 'layout.html'}} h1This is the item/index.html template/h1 {{=LOAD(request.controller,'p_view_list.load')}}

[web2py] Re: Error in wsgi/apache

2010-07-21 Thread mdipierro
Hi Graham, I did not say this is a problem with apache or mod_wsgi. I said I found people using other frameworks having the problem and the solution they proposed worked for me. Massimo On Jul 20, 7:02 pm, Graham Dumpleton graham.dumple...@gmail.com wrote: On Jul 21, 8:18 am, mdipierro

[web2py] Re: Error in wsgi/apache

2010-07-21 Thread mdipierro
Flask uses less resources On Jul 20, 7:17 pm, Thadeus Burgess thade...@thadeusb.com wrote: The solution: I switched to Flask. And the problems dissipated completely, without modifying any configuration of the web server. I would not, and will not use web2py for any application that is

[web2py] Re: Error in wsgi/apache

2010-07-21 Thread mdipierro
Glad it worked for you. I also noticed big improvement when going from 256KB to 384KB on my server. On Jul 20, 10:03 pm, Michael Toomim too...@gmail.com wrote: THANK YOU ALL SO MUCH for your help! I just learned a LOT.  It looks like resource consumption was the problem, because things are

[web2py] Re: Error in wsgi/apache

2010-07-21 Thread mdipierro
I still want to understand why you are having this problem. I see the following possibility: 1) There is a threshold in requests/seconds that depends on memory available and it is different for different frameworks. web2py does more than Flask (which is a microframework by definitions) and this

[web2py] Re: web2py performance issue or rather my fault?

2010-07-21 Thread mdipierro
Hi Thadeus, I looked at the code you used for comparing web2py and Flask. This is NOT A FAIR COMPARISON Here is why: 1) you did not set migrate=False in web2py. This means at every request you lock the entire database table metadata to check whether the table has migrated. You do this

[web2py] Re: Error in wsgi/apache

2010-07-21 Thread mdipierro
I know you got it. ;-) But for everybody else, I responded to this in a different thread: http://groups.google.com/group/web2py/msg/5458046f6c985045 Massimo On Jul 20, 7:17 pm, Thadeus Burgess thade...@thadeusb.com wrote: The solution: I switched to Flask. And the problems dissipated

[web2py] Re: web2py performance issue or rather my fault?

2010-07-21 Thread mdipierro
One more thing because of design flask with generate and reuse pyc file. In the case of web2py python code is executed. You have to explicitly bytecode compile via admin. I am not sure if you have done that. Massimo On Jul 21, 3:36 am, mdipierro mdipie...@cs.depaul.edu wrote: Hi Thadeus,

[web2py] How to create DAL query for this ....

2010-07-21 Thread David Marko
Hello, I have two simple tables: db.define_table('task', Field('subject','string',label='Název'), Field('body','text', label='Podrobný popis'), Field(created_by,db.auth_user, writable=False, readable=True, default=auth.user_id, label='Autor') )

[web2py] Default value for 'double' field bug?

2010-07-21 Thread David Marko
I have a field definition in table 'task' Field(hours,double,default=0, writable=False, readable=True, label='Hours') But default value is not set in the form using SQLFORM. In my db file I must specify 'db.task.hours.default=0' under table definition and it works as expected. But it was working

[web2py] Re: How to create DAL query for this ....

2010-07-21 Thread mdipierro
If you can do JOINS (not on GAE) rows = db(db.reply.task==db.task.id) (db.task.created_by=auth.user.id).select(db.reply.ALL) else (on GAE) task_ids = [task.id for task in db(db.task.created_by=auth.user.id).select(db.task.id)] rows = db(db.reply.belongs(task_ids)).select() either case

[web2py] web2pyslices registration problem

2010-07-21 Thread David Marko
I just tried to register at http://web2pyslices.com. I have received verification email with link, But when clicking on link I'm getting this in browser: '404 NOT FOUND', and registration is not being activated. David

[web2py] Need help with virtualfields

2010-07-21 Thread Adi
Hi all, I am trying to create a virtual field that returns a pretty date for a given date. [web2py version - 1.79.2] db.py --- db.define_table('video', Field('created_on', 'datetime') class DisplayDate(): def added_on(self): return gluon.tools.prettydate(self.video.created_on) controller

[web2py] Re: Default value for 'double' field bug?

2010-07-21 Thread mdipierro
oops. I introduced the bug in a recent commit (this should not be in 1.81.4). I just fixed it in trunk. Please check. Thanks for reporting the issue. On Jul 21, 4:23 am, David Marko dma...@tiscali.cz wrote: I have a field definition in table 'task' Field(hours,double,default=0, writable=False,

[web2py] Problems changing table definition

2010-07-21 Thread Paul Gerrard
Hi, I'm having great problems changing the definition of a table. I'm using MYSQL as a back end. After many problems, I ended up deleting a table entirely and trying to recreate it in my DB model. I dropped the table from MYSQL directly and tried to use the new model. Unfortunately, I get a

[web2py] Re: Default value for 'double' field bug?

2010-07-21 Thread David Marko
Just updated from mercurial repository, yes working correctly now. Thank you. David On 21 čnc, 11:38, mdipierro mdipie...@cs.depaul.edu wrote: oops. I introduced the bug in a recent commit (this should not be in 1.81.4). I just fixed it in trunk. Please check. Thanks for reporting the issue.

[web2py] Re: Problems changing table definition

2010-07-21 Thread Paul Gerrard
An updqate. I read the manual 6.4 on Migrations. I've added a migrate='tablename' aramter to the table definition call. It seems to work. So I guess I've disconnected the table definition from the Web2py table history. So far so good. So I have a more general point. Is it 'better' to manage

[web2py] Re: Need help with virtualfields

2010-07-21 Thread mdipierro
The code you posted works for me but I did found a bug in web2py that would cause this problem. The bug would show up if you were to import a module of define a local variable in added_on(..) and prevent web2py from finding the virtualfield. I have not fixed the bug in trunk. Massimo On Jul 21,

[web2py] Re: Problems changing table definition

2010-07-21 Thread mdipierro
It is better to always use web2py but remember to use (default) migrate=True every time you edit the db. You may also want to keep a backup of your database/*.tables On Jul 21, 4:54 am, Paul Gerrard p...@gerrardconsulting.com wrote: An updqate. I read the manual 6.4 on Migrations. I've added a

Re: [web2py] Re: web2py performance issue or rather my fault?

2010-07-21 Thread Iceberg
Hi Massimo, do you hint that all these measure are needed to minimize (if not get rid of) the occasional slow response? 1) set migrate=False in the web2py code 2) ... (N/A) 3) disable session feature as long as your app does not need it. (But how to? Is session.forget() enough?) 4) bytecode

[web2py] Re: Need help with virtualfields

2010-07-21 Thread Adi
What version of web2py are you on? I am on 1.79.2 - and there's no local variable situation here. I printed str(v) but it doesn't show the new virtualfield. gluon.tools.* is already imported in db.py so I haven't added any import statement for prettydate either. On Jul 21, 3:05 pm, mdipierro

[web2py] Re: web2pyslices registration problem

2010-07-21 Thread mr.freeze
It looks like you've already clicked the link. Have you tried logging in? On Jul 21, 4:25 am, David Marko dma...@tiscali.cz wrote: I just tried to register athttp://web2pyslices.com. I have received verification email with link, But when clicking on link I'm getting this in browser: '404 NOT

[web2py] Re: Need help with virtualfields

2010-07-21 Thread mr.freeze
I wouldn't use a virtualfield for this since you're only interacting with one field. You can use do: db.video.create_on.represent = lambda v: gluon.tools.prettydate(v) On Jul 21, 5:17 am, Adi aditya.sa...@gmail.com wrote: What version of web2py are you on? I am on 1.79.2 - and there's no local

[web2py] web2py and tomcat on same server possible?

2010-07-21 Thread Andrew Buchan
Hi all, We've got someone coming next week to install a tool which requires tomcat, and the plan is to put that on the same (Windows 2003) server where web2py is currently running as a service. I know that IIS should be disabled when running web2py, and was wondering whether there were any

[web2py] Re: Customizing auth.login form to specify class or id other than default value

2010-07-21 Thread mr.freeze
You are modifying the field after you display it. This line: {{=logForm.custom.widget.email}} needs to come after you set the attributes. On Jul 21, 2:40 am, Abhinav S greatsood.a...@gmail.com wrote: Okay, I am trying to do the same thing and I employed the method suggested by Mr.Freeze but

[web2py] Re: Need help with virtualfields

2010-07-21 Thread Adi
whoa! new word represent. Doesn't work for me (although no error shown) Any documentation of what represent does? I added the line to the end of my db.py file and accessed using the same v.created_on field - it shows the database date field. On Jul 21, 3:50 pm, mr.freeze nat...@freezable.com

[web2py] Re: Need help with virtualfields

2010-07-21 Thread Adi
http://groups.google.com/group/web2py/browse_thread/thread/c5fc516718573e9/215b12bb0e7e6fa3?lnk=gstq=represent#215b12bb0e7e6fa3 Seems represent would work only with SQLFORM and SQLTABLE. I got it to work by the explicit call example given in that discussion Thanks! On Jul 21, 4:27 pm, Adi

[web2py] plugin_jqgrid and events

2010-07-21 Thread Massimiliano
Hi, I'm trying to play with cube2py, is amazing. I've a little problem with the jqgrid plugin, problem that didn't appears using jqgrid standalone (declaring the grid in template and using json to retrieve the data). When I try to set an event, for example ondblClickRow, the grid's row

[web2py] Re: web2py performance issue or rather my fault?

2010-07-21 Thread mdipierro
The issue is that every web app eventually starts dropping requests when the server exceeds its capacity. That capacity depends on the web framework, the details of the app, the ram and speed of the server. It is more likely if the web app an exclusive lock on some file and keeps it locked for

[web2py] Re: web2pyslices registration problem

2010-07-21 Thread mdipierro
I am going to move the online book to RPX. Perhaps web2lyslices should do the same. On Jul 21, 5:45 am, mr.freeze nat...@freezable.com wrote: It looks like you've already clicked the link. Have you tried logging in? On Jul 21, 4:25 am, David Marko dma...@tiscali.cz wrote: I just tried to

[web2py] Re: web2py and tomcat on same server possible?

2010-07-21 Thread mdipierro
Why would IIS be disabled when running web2py? There are conflicts only if two servers use the same port. The best setting if you need to run apps that need incompatible servers is to run both on different ports and have one proxy the other. On Jul 21, 6:00 am, Andrew Buchan andyha...@gmail.com

[web2py] Re: web2py performance issue or rather my fault?

2010-07-21 Thread mdipierro
On the other hand, Kuba, who started this thread, later said I moved to apache/WSGI from Rocket. For me the problem disappears.  So I guess there is a standalone rule #5: Use apache/WSGI etc. instead of the built-in Rocket ? I do not think it is a web server issue as much as an issue with

[web2py] Re: plugin_jqgrid and events

2010-07-21 Thread mdipierro
The jQuery(...).jqGrid is already called by the plugin. You cannot call it twice. I think you can use jQuery(...).setGridParam({...}) to change grid parameters. On Jul 21, 6:39 am, Massimiliano mbelle...@gmail.com wrote: Hi, I'm trying to play with cube2py, is amazing. I've a little

[web2py] Re: Need help with virtualfields

2010-07-21 Thread mdipierro
They the virtaulfields using the nighty build from here http://www.web2py.com/examples/default/download On Jul 21, 6:37 am, Adi aditya.sa...@gmail.com wrote: http://groups.google.com/group/web2py/browse_thread/thread/c5fc516718... Seems represent would work only with SQLFORM and SQLTABLE. I

[web2py] Re: load_action information

2010-07-21 Thread JmiXIII
Now I've tried this after updating to the last version and after having seen What is going on with web2py. `` name: load_action action: saisie.load controller: default ajax: True ``:widget and it works fine. Thanks Massimo Now does any body knows if there is a way to keep the initial view

[web2py] Re: load_action information

2010-07-21 Thread mdipierro
I do not understand the question On Jul 21, 7:00 am, JmiXIII sylvn.p...@gmail.com wrote: Now I've tried this after updating to the last version and after having seen What is going on with web2py. `` name: load_action action: saisie.load controller: default ajax: True ``:widget and it

[web2py] memcache error

2010-07-21 Thread Scott
I'm running Ubuntu 10.04 and installed memcached which works fine locally. I installed the web2py stable 1.84.1 build and the stable wiki plugin from web2py.com. I followed the instructions at: http://web2py.com/book/default/section/11/12 to store the sessions in memcache for the provided

[web2py] Re: memcache error

2010-07-21 Thread Scott
One other thing I've noted is that by setting this, attempting to view /welcome/appadmin/ccache will generate the following ticket: Traceback (most recent call last): File /home/scott/Projects/web2py/gluon/restricted.py, line 178, in restricted exec ccode in environment File

[web2py] Re: memcache error

2010-07-21 Thread mdipierro
I do not remember who wrote that code but I just looked at it and I am bit confused by it. Anyway, I think I have a fix. Please try replace gluon/contribmemcache/ memcache.py with this file: http://web2py.googlecode.com/hg/gluon/contrib/memcache/memcache.py Massimo On Jul 21, 7:27 am, Scott

[web2py] CRUD and controllers

2010-07-21 Thread Running Clam
Hi, I've been trying to get to grips with CRUD after previously doing things mostly manually, but I seem to have fallen at the first hurdle with crud.tables(). If I call crud.tables() from a function called tables in MyController and just let the generic template render it, I do get the

[web2py] pycloud, cool!

2010-07-21 Thread mdipierro
http://www.picloud.com/

Re: [web2py] Re: plugin_jqgrid and events

2010-07-21 Thread Massimiliano
Massimo, thank you for your fast reply. unfortunately with setGridParm I get the same behavior. What are your best practice to edit a record using jqgrid for selection? Thank you and thank you again for you work. Massimiliano On Wed, Jul 21, 2010 at 1:59 PM, mdipierro mdipie...@cs.depaul.edu

[web2py] Re: CRUD and controllers

2010-07-21 Thread mdipierro
Crud does not determine in which controller it is called. You need to do crud.settings.controller = 'MyController' I may be able to change this behavior anyhow. Massimo On Jul 21, 7:34 am, Running Clam running.c...@gmail.com wrote: Hi, I've been trying to get to grips with CRUD after

Re: [web2py] Re: web2py performance issue or rather my fault?

2010-07-21 Thread Kuba Kucharski
On Wed, Jul 21, 2010 at 1:54 PM, mdipierro mdipie...@cs.depaul.edu wrote: On the other hand, Kuba, who started this thread, later said I moved to apache/WSGI from Rocket. For me the problem disappears.  So I guess there is a standalone rule #5: Use apache/WSGI etc. instead of the built-in

[web2py] Re: CRUD and controllers

2010-07-21 Thread mdipierro
I made some change in trunk about this right now you can do crud=Crud(globals(),db,controller='default') and controller has to be the controller that exposes: def download(): ... #necessary def data(): return dict(form=crud()) #optional But you can also use crud in other controllers and

[web2py] auth.settings.register_onaccept issue

2010-07-21 Thread Vidul Petrov
Hi all, I am trying to insert default value in some_table for new users: # init/controllers/default.py def __insert_default_val(form): db.some_table.insert(val1=1, val2=2, created_by=form.vars.id) auth.settings.register_onaccept = __insert_default_val but I get the following exception:

[web2py] Re: plugin_jqgrid and events

2010-07-21 Thread mdipierro
If you want to be able to click on a record and go somewhere you can do: db.table.id.represent=lambda id: A('edit',_href=URL(r=request,f='edit_record',args=id)) On Jul 21, 7:45 am, Massimiliano mbelle...@gmail.com wrote: Massimo, thank you for your fast reply. unfortunately with setGridParm

[web2py] Re: load_action information

2010-07-21 Thread JmiXIII
Sorry I have just find what I wanted: Let's say I have: `` name: load_action action: saisie controller: default ajax: True ``:widget where : def saisie(): return dict(stuff=stuff) saisie.html is : {{extend 'layout.html'}} h2{{=Selection}}/h2 h1{{=CArt}}{{=ArtOF}}/h1. I just needed to

Re: [web2py] Re: plugin_wiki

2010-07-21 Thread Luis Díaz
Greetings, my personal and humble opinion about plugin_wiki: You're on the right track and if it remains as plugin, I congratulate you in advance! Plugin_wiki I hope to keep growing and allow more people to become part of Community shows I hope it is another tool and not something that

[web2py] Re: web2py performance issue or rather my fault?

2010-07-21 Thread mdipierro
I am not ruling it out. I believe some people are having the problem but not everybody has having this problem. I am trying help isolate the possible causes. You said: I moved to apache/WSGI from Rocket. For me the problem disappears. therefore your problem is not the same that some other

[web2py] Re: auth.settings.register_onaccept issue

2010-07-21 Thread mdipierro
the error is not in the above code. Can you post the exact model and action? On Jul 21, 8:09 am, Vidul Petrov vidul.r...@gmail.com wrote: Hi all, I am trying to insert default value in some_table for new users: # init/controllers/default.py def __insert_default_val(form):    

[web2py] Re: plugin_wiki

2010-07-21 Thread mdipierro
I hope it is another tool and not something that replaces the current model: view: layout, controller: default.py, etc. .. I read in previous post I intend to leave as mdipierro plugin, to coexist with existing It will remain a plugin and it will not replace the existing web2py as you know

Re: [web2py] Re: CRUD and controllers

2010-07-21 Thread Running Clam
Hi Massimo, On 21/07/10 13:46, mdipierro wrote: Crud does not determine in which controller it is called. You need to do crud.settings.controller = 'MyController' I may be able to change this behavior anyhow. Aha - I had not realised this. Links in the data returned by crud.tables() are

[web2py] Re: auth.settings.register_onaccept issue

2010-07-21 Thread Vidul Petrov
# the action def __insert_default_sm(form): db.some_table.insert(val1=1, val2=2, created_by=form.vars.id) auth.settings.register_onaccept = __insert_default_sm def user(): return dict(form=auth()) # the model ... # the other auth settings

Re: [web2py] Re: web2py performance issue or rather my fault?

2010-07-21 Thread Kuba Kucharski
You said: I moved to apache/WSGI from Rocket. For me the problem disappears. therefore your problem is not the same that some other problems experienced with apache/WSGI. look at Iceberg, Rahul, MikeEllis in this thread You also said you cache.ram all requests. Can you try remove the caching?

[web2py] Re: CRUD and controllers

2010-07-21 Thread mdipierro
There are two uses of crud. The typical use is this: form=crud.create(db.table) form=crud.update(db.table,record_id) table=crud.select(db.table) form,table=crud.search(db.table) You can also do this def data(): return dict(form=crud()) This exposes everything and it intended mostly as an

[web2py] Re: auth.settings.register_onaccept issue

2010-07-21 Thread mdipierro
I just tried this and I cannot reproduce the problem with this model. On Jul 21, 8:26 am, Vidul Petrov vidul.r...@gmail.com wrote: # the action def __insert_default_sm(form):     db.some_table.insert(val1=1, val2=2, created_by=form.vars.id) auth.settings.register_onaccept =

Re: [web2py] Re: web2py performance issue or rather my fault?

2010-07-21 Thread Kuba Kucharski
therefore your problem is not the same that some other problems experienced with apache/WSGI. exactly, look at Iceberg, Rahul, MikeEllis in this thread I was just pointing out that I am not the only one seeing rocket-specific-problem

[web2py] Re: The one video you should watch

2010-07-21 Thread MikeEllis
Massimo, It's either in your environment (eg RF from fluorescent lights or perhaps a wireless phone on the table) or in your audio circuitry. Assuming you're using your MacBook's built-in video cam and mic, what happens if you make a recording in a different room or building? On Jul 21, 12:20 

[web2py] Re: web2py performance issue or rather my fault?

2010-07-21 Thread mdipierro
I agree with your assessment. The problem you, Iceberg, Rahul, and MikeEllis are having with Rocket appears distinct from the problem Thadeus is having uwsgi+cherokee. In my previous email I tried to suggest changes in Thadeus code to isolate the cause of his problem. Going back to your

[web2py] Re: memcache error

2010-07-21 Thread Scott
Massimo, That fixed the ValueError: invalid literal for int() with base 10: 'NOT_FOUND' error for missing sessions. Thanks! The AttributeError: '_MemcacheClient' object has no attribute 'storage' error remains. Maybe the code block and imports from gluon/cache.py need to be added to

[web2py] Re: web2py performance issue or rather my fault?

2010-07-21 Thread Timbo
Can you get me a debug log of the problem as I described earlier? On Jul 21, 8:49 am, Kuba Kucharski kuba.kuchar...@gmail.com wrote: therefore your problem is not the same that some other problems experienced with apache/WSGI. exactly, look at Iceberg, Rahul, MikeEllis in this thread I

Re: [web2py] Re: web2py performance issue or rather my fault?

2010-07-21 Thread Thadeus Burgess
I will make said changes, and add my Flask-DAL extension to the flask app, so at least the database layer will be the exact same. Flask handles sessions too. I shouldn't disable web2py sessions while letting flask use sessions, that would be an unfair test too. The good news is, that even with

[web2py] Re: auth.settings.register_onaccept issue

2010-07-21 Thread Vidul Petrov
Thank you Massimo. After your answer I checked the custom auth_table and it turns out that one of the fields is the issue: # wrong Field('age', 'integer', default='') # right Field('age', 'string', default='') # because the validator is: auth_table.age.requires = IS_IN_SET(('',) +

[web2py] is None

2010-07-21 Thread Jonathan Lundell
From time to time we see advice to use 'is' when testing against None in Python. I was reminded of that by this checkin (which I should say I don't think is actually a problem) -self.default = default or update # default value for field +self.default = default==None and update

[web2py] Re: memcache error

2010-07-21 Thread mdipierro
Please try trunk again and let me know. On Jul 21, 9:11 am, Scott blueseas...@gmail.com wrote: Massimo, That fixed the ValueError: invalid literal for int() with base 10: 'NOT_FOUND' error for missing sessions.  Thanks! The AttributeError: '_MemcacheClient' object has no attribute

[web2py] Re: web2py performance issue or rather my fault?

2010-07-21 Thread mdipierro
Thank you Thadeus for your help with these tests. I did not see a open_session(request) in your Flask code. Where does Flask save sessions? filesystem or client? If they are saved on the client that is closer to session.forget() in web2py since filling the filesystem with one question file for

[web2py] Re: web2py performance issue or rather my fault?

2010-07-21 Thread mdipierro
I propose closing this thread and opening two different threads: Rocket performance issues (Tim/Kuba please open it) uWSGI performance issues (Thadeus please open it) Otherwise this is getting more confused that needs to be. Massimo On Jul 21, 9:44 am, Timbo tfarr...@owassobible.org wrote:

[web2py] rocket performance issues

2010-07-21 Thread Kuba Kucharski
sometimes, once every few hits, page loads significantly slower weirdest thing is when you re-click the link it loads instantly, when you left it working to load on itself, it is slow.. like 4 to 8 seconds some people report more, 20 seconds, 1 minute. Tim, can you reproduce this? Have you tried

[web2py] Re: Problems changing table definition

2010-07-21 Thread Paul Gerrard
Thanks - I already do nightly backups of data and code (been stung too many times before). I want to use Web2p as you say, but I've had problems in the past. 2-3 times, no matter what I've tried, I couldn't edit the DB.py file and avoid crashes. Ended up deleting tables, massaging data with MS

[web2py] Re: Problems changing table definition

2010-07-21 Thread howesc
I agree with massimo about using web2py's migration features where possible. Unfortunately there are some migrations that web2py just cannot do if there is data in the table (at least that was true in postgres a while ago). Such things include making a previous nullable field not nullable, and i

[web2py] Re: Problems changing table definition

2010-07-21 Thread mdipierro
In these cases you can still do the migrations in web2py but you have to do them in two steps: 1) remove the column 2) run appadmin 3) add the new column 4) run appadmin if you do migrations that involved a change in a column in one step, web2py tries to port the data and that is not always

[web2py] Re: rocket performance issues

2010-07-21 Thread mdipierro
Kuba, please try set cron=False in web2py.py. Does it make things better? Massimo On Jul 21, 10:33 am, Kuba Kucharski kuba.kuchar...@gmail.com wrote: sometimes, once every few hits, page loads significantly slower weirdest thing is when you re-click the link it loads instantly, when you left

[web2py] Re: rpxauth

2010-07-21 Thread Yarin
Massimo, can you explain why you are using RPX/Janrain vs a straight- up OpenID implementation? It seems Janrain provides the same set of features OpenID was meant to provide? How do the two relate? I was playing around with w2p-openID (http://w2popenid.appspot.com/ init/default/wiki/main) -

Re: [web2py] Re: rocket performance issues

2010-07-21 Thread Kuba Kucharski
yes, but I am on the GPRS connection now, I am not able to test it so the results be reliable, I will try to do that asap

[web2py] Re: Error in wsgi/apache

2010-07-21 Thread Michael Toomim
Great! I want to understand it too! Your breakdown helps me think about how to look into this. I will do some more analysis, but for now: - I'm not using forms - I had migrate=True and the app was not compiled earlier. now it's compiled and migrate=False and I have a bigger machine, things

[web2py] Re: memcache error

2010-07-21 Thread Scott
OK, I got an error, unknown global variable 'app' in gluon.contrib.memcache.__init__.py. Here are the proposed code fixes to memcache.__init__.py which I've tested locally and know to work: Add this import at the top of the file: from gluon.cache import CacheAbstract In class

[web2py] Re: generic.load question

2010-07-21 Thread Rob
Hi Massimo, Yea, setting ajax=True makes it work fine. I haven't tested trunk yet. Sorry for being dense, but what is the use case for the .load version? {{=LOAD(request.controller,'p_view_list')}} renders the full view. {{=LOAD(request.controller,'p_view_list.load')}} just returns the raw

Re: [web2py] Re: Error in wsgi/apache

2010-07-21 Thread Thadeus Burgess
For the record, I never really had any issues with web2py filling up my RAM, mostly just crashing while processing a certain number of requests. Even after the ab tests, when looking at RAM usage, it would only spike to maybe 150MB for all apache+mod_wsgi+web2py processes, and then go back down

[web2py] Re: rocket performance issues

2010-07-21 Thread MikeEllis
I tried changing to cron=False in web2py.py. No impact on problem. Same two-laptop setup as described previous. Happens even on pages that contain very little. Chrome DevTools shows same problem as before: One or more the .js/.css/.png files are delayed by 20 to 25 seconds latency. The

[web2py] Re: rocket performance issues

2010-07-21 Thread MikeEllis
One more detail. As you would hope, it's generally not the case that both browsers stall at the same time. While stalled on either laptop I can keep reloading on the other. On Jul 21, 3:03 pm, MikeEllis michael.f.el...@gmail.com wrote: I tried changing to cron=False in web2py.py.  No impact on

[web2py] Re: pycloud, cool!

2010-07-21 Thread MikeEllis
I see the list of packages includes urllib, so this might be a useful and easy way to massively stress test a web app, e.g. deploy a few thousand function instances that request a page after a random delay, time the response, and return the delta-t. Assuming of course they let you make requests

[web2py] Re: memcache error

2010-07-21 Thread mdipierro
Please check trunk again. Thanks for your help. On Jul 21, 1:25 pm, Scott blueseas...@gmail.com wrote: OK, I got an error, unknown global variable 'app' in gluon.contrib.memcache.__init__.py.  Here are the proposed code fixes to memcache.__init__.py which I've tested locally and know to

[web2py] Re: generic.load question

2010-07-21 Thread mdipierro
The idea of load is to render the content of the pay without the layout. On Jul 21, 1:57 pm, Rob r...@rmdashr.com wrote: Hi Massimo, Yea, setting ajax=True makes it work fine.  I haven't tested trunk yet. Sorry for being dense, but what is the use case for the .load version?

[web2py] Re: web2py performance issue or rather my fault?

2010-07-21 Thread Vidul Petrov
I am in doubt that web2py is the bottleneck. My recent tests on a modest cloud server (2GHz CPU, 1G RAM): 1_000, 5_000, and 10_000 requests in total, 100 concurrent requests - 16 milliseconds per request with no HTTP server errors. The RDBMS and the HTTP server in question were Postgres and

[web2py] Re: rocket performance issues

2010-07-21 Thread mdipierro
The fact that you are having the problem with static files is giving me an idea for a test. Can you please try the web2py I just posted in trunk? Massimo On Jul 21, 2:08 pm, MikeEllis michael.f.el...@gmail.com wrote: One more detail.  As you would hope, it's generally not the case that both

[web2py] Re: Executing applications from web2py

2010-07-21 Thread mdipierro
Welcome Hector, using os.system is fine if the the commands are short and independent. I would recommend creating a database table of tasks to be executed db.define_table('task_queue',Field('status'),Field('command')) The web app would queue commands (status=queued) and a web2py shell script

[web2py] Re: web2py performance issue or rather my fault?

2010-07-21 Thread mdipierro
Which os? fcgi? On Jul 21, 4:02 pm, Vidul Petrov vidul.r...@gmail.com wrote: I am in doubt that web2py is the bottleneck. My recent tests on a modest cloud server (2GHz CPU, 1G RAM): 1_000, 5_000, and 10_000 requests in total, 100 concurrent requests - 16 milliseconds per request with no HTTP

[web2py] Re: plugin_wiki

2010-07-21 Thread Tim Michelsen
What does the roadmap look like for the future? Yes, that's exactly my question at the moment. I mean there were a numbert of attempts: t1, t2, c9, cube2py and now just plugin_wiki. How much is the core team dedicated to make this more that just a demo project? Web development at my company

[web2py] Re: Error in wsgi/apache

2010-07-21 Thread Michael Toomim
Great! I want to understand it too! Your breakdown helps me think about how to look into this. I will do some more analysis, but for now: - I'm not using forms - I had migrate=True and the app was not compiled earlier. now it's compiled and migrate=False and I have a bigger machine, things

[web2py] Re: rpxauth

2010-07-21 Thread mdipierro
There are multiple ways to login with web2py and one of them, which you point out is OpenID. The problem is setting these things up is usually more complex than needs to be. RPX allows developers to outsource this problem, configure multiple login methods in one place, keeps statistics about

Re: [web2py] Re: web2py performance issue or rather my fault?

2010-07-21 Thread Thadeus Burgess
I try. I have several copies of web2py core that I have modified in attempt to fix these issues, attempting to narrow down the cause, to no avail yet. I want to do two more tests. The first one, make flask use the web2py DAL so we can compare core to core. Make sure web2py has all of the fancy

[web2py] Re: web2py performance issue or rather my fault?

2010-07-21 Thread mdipierro
Thank you Thadeus. This seems a good approach. Massimo On Jul 21, 4:33 pm, Thadeus Burgess thade...@thadeusb.com wrote: I try. I have several copies of web2py core that I have modified in attempt to fix these issues, attempting to narrow down the cause, to no avail yet. I want to do two

[web2py] Re: please explain this twitter post

2010-07-21 Thread mdipierro
Oops. It seems the link got truncated http://www.computer.org/portal/web/csdl/doi/10.1109/MCSE.2010.97

[web2py] Access other middleware and business logic from web2py

2010-07-21 Thread ChristophW
Hello, I am currently looking into web2py to more efficiently build a complex web interface for an even more complex server application. Just FYI, I don't have much experience with Python and nil with web2py so far. Currently my concern is the business logic, where it is located and where the

  1   2   >