[web2py] Re: Chunked downloads and corrupt files with Internet Explorer 8 (IE8)
https://github.com/explorigin/Rocket/issues/1 On Dec 9 2011, 8:02 pm, Timothy Farrell explori...@gmail.com wrote: David, Thanks for your offer to help with this. The best way to help right now would be to provide me a smallish pcap file that records it happening so I can see which parts of the files are missing. Thanks, Timothy Farrell On Dec 5, 9:07 pm, David Tse muka...@gmail.com wrote: I'm experiencing this problem as well, and signs on my side are also pointing to Rocket. Although my case is a little different because I'm not currently experiencing this problem with web2py, but I'm using Rocket by itself to serve a light-weight service using a smaller micro-framework. However, I have experience this in the past with web2py, and I forgot what I did at the time but the problem went away somehow. Back to the issue at hand. I'm current using Rocket to serve a tiny WSGI app and using bottle.py as the framework, and I've seen large file downloads (100MB+) missing anywhere between 8 to 32 KB, usually 8K. I've tested with serving directly with Rocket and also proxy-ing Rocket behind Nginx. I'm also using SSL when serving directly with Rocket, and Nginx doing the SSL when running behind it. The issue is somewhat intermittent, and for some reason it seems to happen less behind Nginx but still does. I primarily use curl for my testing, and when it does happen curl would get stuck near the very end and times out after a while. I'm running with Rocket 1.2.4, on Ubuntu 10.04. The problem goes away if I change to cherrypy or gevent, which is what leads me to think it might be Rocket. I found this thread when googling to see if anyone else was experiencing this in the web2py community. I'd be happy to help track this down.
[web2py] Re: Chunked downloads and corrupt files with Internet Explorer 8 (IE8)
David, Thanks for your offer to help with this. The best way to help right now would be to provide me a smallish pcap file that records it happening so I can see which parts of the files are missing. Thanks, Timothy Farrell On Dec 5, 9:07 pm, David Tse muka...@gmail.com wrote: I'm experiencing this problem as well, and signs on my side are also pointing to Rocket. Although my case is a little different because I'm not currently experiencing this problem with web2py, but I'm using Rocket by itself to serve a light-weight service using a smaller micro-framework. However, I have experience this in the past with web2py, and I forgot what I did at the time but the problem went away somehow. Back to the issue at hand. I'm current using Rocket to serve a tiny WSGI app and using bottle.py as the framework, and I've seen large file downloads (100MB+) missing anywhere between 8 to 32 KB, usually 8K. I've tested with serving directly with Rocket and also proxy-ing Rocket behind Nginx. I'm also using SSL when serving directly with Rocket, and Nginx doing the SSL when running behind it. The issue is somewhat intermittent, and for some reason it seems to happen less behind Nginx but still does. I primarily use curl for my testing, and when it does happen curl would get stuck near the very end and times out after a while. I'm running with Rocket 1.2.4, on Ubuntu 10.04. The problem goes away if I change to cherrypy or gevent, which is what leads me to think it might be Rocket. I found this thread when googling to see if anyone else was experiencing this in the web2py community. I'd be happy to help track this down.
[web2py] Re: web2py 1.99.2 is OUT
I guess I could expound upon that a little more. Rocket does not allow insecure connections on secure sockets. So if a secure connection fails for whatever reason it will fail (here https://github.com/explorigin/Rocket/blob/master/rocket/listener.py#L106 ) but what happens is that the returned socket is a normal socket not an SSLSocket. The actual detection is a combination of things: 1) The Connection object detects if the connection is secure or not and also records if it should be secure (here: https://github.com/explorigin/Rocket/blob/master/rocket/connection.py#L45 ) 2) The Worker class compares these values such that if a socket is supposed to be secure but is not, it will close the connection and not process the request (here: https://github.com/explorigin/Rocket/blob/master/rocket/worker.py#L155 ). The code is not awesomely concise, but the net effect is that no insecure connections get processed as secure ones. I left the try/except block in there so that it wouldn't fail there so my listener threads weren't also having to handle responses. There seemed little reason to log the error (to me) since if things were setup correctly, it wouldn't error in interesting scenarios. However it's useful when developing (as Michele figured out) to add a log line there. I'm open to there being a log line there but I think it will overload the logfiles with useless messages because there are scanners all over the internet that try to connect to secure sockets insecurely all the time. I'm open to ideas. Share them with me. =) -tim On Sep 26, 11:29 am, Jonathan Lundell jlund...@pobox.com wrote: On Sep 26, 2011, at 9:07 AM, Michele Comitini wrote: Ross, Jonathan, I was the guilty one to put the log line, since I had to debug the new ssl code which can optionally check for a client submitted x509 cert. I left it there because IMHO the try/except/pass pattern can be dangerous and hide serious low level errors. The specific matter seems to point to an error happening only on certain Python and/or OpenSSL version combinations. *It seems harmless*. What I can suggest is trying to upgrade to latest OpenSSL major version and Python minor and see the problem persists. It does not depend on Web2Py for as much I can see. In any case even if it is clear that the error was there before but hiddend, it must be addressed because it is related to security and integrity of the trasmitted data. I expect you're right here; at the very least the code should have been more specific about the errors it was ignoring. And the detected by Worker comment is at least suspect. mic 2011/9/26 Jonathan Lundell jlund...@pobox.com: On Sep 26, 2011, at 8:27 AM, Ross Peoples wrote: It was the admin application, which should be using HTTPS when you access it over HTTPS right? I just tried with a test app and the same thing happens. I commented out like 518 in rocket.py and that silences the errors, but is that a good thing? I don't know. I looked at the recent changes in rocket.py, and the addition of that log line is the only change that I can see that looks relevant if you're not using a client certificate. Notice the (existing) comment: except SSLError: # Generally this happens when an HTTP request is received on a # secure socket. We don't do anything because it will be detected # by Worker and dealt with appropriately. self.err_log.error('SSL Error: %s' % traceback.format_exc()) -- this was added pass It may well be that the lack of a log here was hiding *other* errors that we ought to know about. There is actually one other block of new code: if conn.ssl: try: peercert = conn.socket.getpeercert(binary_form=True) environ['SSL_CLIENT_RAW_CERT'] = \ peercert and ssl.DER_cert_to_PEM_cert(peercert) except Exception,e: print e The cert is being captured for use by the X509 code. Looks harmless, and you're not getting that exception. There might be another problem here. I just checked the traffic going to my test app and all requested files (including the static ones) are requested over HTTPS, however, Google Chrome has disabled my JavaScript because This page has insecure content. All the static files are loaded locally (I'm not using a CDN or anything). So are the files getting returned to the browser over HTTP instead of HTTPS or something and that's why the rocket error was happening?
[web2py] Re: Rocket support IPv6
A boy, Zane. A healthy 8lbs 5oz. Find me on Google+ for some images. On Jul 31, 3:39 pm, Michele Comitini michele.comit...@gmail.com wrote: Tim, Congratulations. Male or Female? :-) mic 2011/7/31 Timothy Farrell explori...@gmail.com: OK, I'll take a look at these. New baby here so I'll probably be slow. -tim On Jul 29, 5:25 am, Massimo Di Pierro massimo.dipie...@gmail.com wrote: Since you are at it... can you check why (I think and I may be wrong) rocketresponds http/1.1 even when the request is http/1.0? On Jul 28, 8:46 am, Timothy Farrell explori...@gmail.com wrote: Rocketdoesn't currently support IPv6. As I understand adding support would not be difficult. If I add it in, can you help me test it? Thanks, -tim On Jul 26, 11:34 pm, Rahul rahul.dhak...@gmail.com wrote: Hi Tim, All, DoesRocketsupport IPv6? If not, can we expect this to be added to its feature set anytime soon ? Rahul D
[web2py] Re: Rocket support IPv6
OK, I'll take a look at these. New baby here so I'll probably be slow. -tim On Jul 29, 5:25 am, Massimo Di Pierro massimo.dipie...@gmail.com wrote: Since you are at it... can you check why (I think and I may be wrong) rocket responds http/1.1 even when the request is http/1.0? On Jul 28, 8:46 am, Timothy Farrell explori...@gmail.com wrote: Rocket doesn't currently support IPv6. As I understand adding support would not be difficult. If I add it in, can you help me test it? Thanks, -tim On Jul 26, 11:34 pm, Rahul rahul.dhak...@gmail.com wrote: Hi Tim, All, Does Rocket support IPv6? If not, can we expect this to be added to its feature set anytime soon ? Rahul D
[web2py] Re: Rocket support IPv6
Rocket doesn't currently support IPv6. As I understand adding support would not be difficult. If I add it in, can you help me test it? Thanks, -tim On Jul 26, 11:34 pm, Rahul rahul.dhak...@gmail.com wrote: Hi Tim, All, Does Rocket support IPv6? If not, can we expect this to be added to its feature set anytime soon ? Rahul D
[web2py] Re: images not loading completely
I just assumed these were being served statically. It didn't hit me that they were run from a controller. To those reading, I was not able to reproduce Philip's issue on my machine. Perhaps someone who has a similar setup as him could test it. On Apr 25, 10:53 am, pbreit pbreitenb...@gmail.com wrote: The static folder needs to be configured already. If youre iamges don't need any processing (auth) it seems a better way to go.
[web2py] Re: images not loading completely
Oh...that setup is: Mac OS X.6.7 web2py 1.94.6 Server: Rocket 1.2.2 Python/2.5.1 Contact Philip, if you have something similar and are willing to test. On Apr 26, 7:39 am, Timothy Farrell explori...@gmail.com wrote: I just assumed these were being served statically. It didn't hit me that they were run from a controller. To those reading, I was not able to reproduce Philip's issue on my machine. Perhaps someone who has a similar setup as him could test it. On Apr 25, 10:53 am, pbreit pbreitenb...@gmail.com wrote: The static folder needs to be configured already. If youre iamges don't need any processing (auth) it seems a better way to go.
[web2py] Re: images not loading completely
@VP, how long ago did you have this issue? @Phillip is there any chance I could git a copy of your program and data? Whenever I test Rocket, I test it by creating an oversized web2py app (typically 100 MB) and exporting and reimporting it. I never release a version of Rocket that can't do this. Thanks, -tim On Apr 23, 11:02 pm, Massimo Di Pierro massimo.dipie...@gmail.com wrote: Are you using apache as a proxy? Is rocket serving the images behind a proxy? On Apr 23, 10:47 pm, Bruno Rocha rochacbr...@gmail.com wrote: I have similar problem with Apache + Nginx running on webfaction, I did not figure out how to make apache serve images, I already did everything on apache config. I have the same problem on CursoDePython.com.br, NatalAnimal.com.br and SerafimNatural.com.br (which has a photoGallery). Sometimes images dont load completely, and sometimes it gets too much time to load or is rasterized during the load process. I also tried to configure another apache instance witha different domain to act as a CDN just to load /static folder, but the problem remains, I think it is a problem on chunck stream mechanism. On Sat, Apr 23, 2011 at 11:28 PM, Philip philipct...@gmail.com wrote: I'm building a photo gallery site and my images are only partially loading. Currently I'm just running it from my computer, and if I view the site from there the images load fine, but if I use another computer they only load partially. Usually they load the first 128kB and then stop, although I have seen some of them load a bit more than that. I was able to produce the same effect by resizing online_book_cover.jpg, in the included Examples project, so that it was larger than 128kB. Then examples/static/img/online_book_cover.jpg only loaded the first 128kB from another computer. I'm running Mac OS 10.6.7 with web2py 1.94.6, using the built-in server. Is there some configuration option for Rocket or web2py that I'm overlooking? Can anyone else reproduce this issue?
[web2py] Re: images not loading completely
VP, Thanks for the reply. The issue you were experiencing has already been addressed and should not show up anymore in web2py. The updating changes came around December 2010. Philip, I'd be happy to look at your code, please feel free to email me privately if you wish Thanks, Tim On Apr 24, 1:33 pm, VP vtp2...@gmail.com wrote: Tim, It's last year. The problem was described here:http://groups.google.com/group/web2py/browse_thread/thread/f7714312d0... On Apr 24, 8:33 am, Timothy Farrell explori...@gmail.com wrote: @VP, how long ago did you have this issue? @Phillip is there any chance I could git a copy of your program and data? Whenever I test Rocket, I test it by creating an oversized web2py app (typically 100 MB) and exporting and reimporting it. I never release a version of Rocket that can't do this. Thanks, -tim On Apr 23, 11:02 pm, Massimo Di Pierro massimo.dipie...@gmail.com wrote: Are you using apache as a proxy? Is rocket serving the images behind a proxy? On Apr 23, 10:47 pm, Bruno Rocha rochacbr...@gmail.com wrote: I have similar problem with Apache + Nginx running on webfaction, I did not figure out how to make apache serve images, I already did everything on apache config. I have the same problem on CursoDePython.com.br, NatalAnimal.com.br and SerafimNatural.com.br (which has a photoGallery). Sometimes images dont load completely, and sometimes it gets too much time to load or is rasterized during the load process. I also tried to configure another apache instance witha different domain to act as a CDN just to load /static folder, but the problem remains, I think it is a problem on chunck stream mechanism. On Sat, Apr 23, 2011 at 11:28 PM, Philip philipct...@gmail.com wrote: I'm building a photo gallery site and my images are only partially loading. Currently I'm just running it from my computer, and if I view the site from there the images load fine, but if I use another computer they only load partially. Usually they load the first 128kB and then stop, although I have seen some of them load a bit more than that. I was able to produce the same effect by resizing online_book_cover.jpg, in the included Examples project, so that it was larger than 128kB. Then examples/static/img/online_book_cover.jpg only loaded the first 128kB from another computer. I'm running Mac OS 10.6.7 with web2py 1.94.6, using the built-in server. Is there some configuration option for Rocket or web2py that I'm overlooking? Can anyone else reproduce this issue?
Re: [web2py] Re: SSL is OFF error message when starting the server
So did that take care of it?? On 5/20/2010 4:15 PM, OMAR wrote: Tim, you were very close. libssl-dev - Massimo, I went the route of installing distutils so I could easy_install, but once again was met with an error: sudo easy_install ssl Processing ssl error: Couldn't find a setup script in ssl Thank you for the suggestions. I see where plenty of other people had the same problem getting SSL support in python. Should I opt to compile python with SSL support to begin with, as this page suggests? http://paltman.com/2007/nov/15/getting-ssl-support-in-python-251/ Perhaps a distro other than Debian? Perhaps I should give up trying to use the included CherryPy server, and use Cherokee or another web server instead? This is very frustrating, and for the most part has nothing to do with web2py. Sorry to clutter the board.
Re: [web2py] Re: nice slides on postgresql vs nodb
Developers running with scissors!! LOL!!! On 5/20/2010 2:12 PM, szimszon wrote: Nice On máj. 20, 19:52, mdipierromdipie...@cs.depaul.edu wrote: http://www.scribd.com/doc/31669670/PostgreSQL-and-NoSQL
Re: [web2py] Re: SSL is OFF error message when starting the server
Yah I hear ya. I love Debian for being rock-solid stable (not to mention that I cut my Linux teeth on it) but man is it OLD! I've had good luck with Ubuntu. I try to stick with Linux systems that use DEBs. I've been burned too many times by RPM-dependency hell! There's always Gentoo! No such thing as a clean installation...you just get used to it. =) Good Luck -tim On 5/21/2010 10:25 AM, OMAR wrote: No, I'm still stuck. Not sure where to go from here, so I'm starting over with a fresh install of the OS. Perhaps I'll pick something with python 2.6 ? Obviously I don't have to implement the ssl through python, I can make the connection through another web server, but I hate to give up after investing this much time. I'm still going to try and use the included CherryPy server for my testing because I'm stubborn. I just can't get the python 2.5 with ssl to work under Debian without compiling it myself. I wanted to keep stability on the server and use the package manager to add programs. Perhaps something like CentOS would be a better choice. Once again, thanks for your help with the problem.
Re: [web2py] Re: SSL is OFF error message when starting the server
The output you show is that it's trying to compile openssl into the ssl module. You'll need to install the openssl headers. The debian package name is probably something like openssl-dev. -tim On 5/19/2010 5:30 PM, OMAR wrote: Tim, thanks for the speedy reply. Sorry to say I'm still stuck. I downloaded the ssl1.5 package and unpacked it. I figured the next step would be, python setup.py install Here was the output: looking for /usr/include/openssl/ssl.h looking for /usr/local/ssl/include/openssl/ssl.h looking for /usr/contrib/ssl/include/openssl/ssl.h Traceback (most recent call last): File setup.py, line 167, inmodule ssl_incs, ssl_libs, libs = find_ssl() File setup.py, line 142, in find_ssl raise Exception(No SSL support found) Exception: No SSL support found Everything on this Debian box was installed via the aptitude package manager. Is the conflict here that it's looking for directories that would be there had I installed from source? That's just my wild guess. Any ideas? Help would be greatly appreciated.
Re: [web2py] Is web2pyslices.com down?
http://downforeveryoneorjustme.com/web2pyslices.com On 5/19/2010 10:14 AM, MikeEllis wrote: Haven't been able to reach it all morning. ping web2pyslices.com PING web2pyslices.com (76.73.68.69): 56 data bytes Request timeout for icmp_seq 0 Request timeout for icmp_seq 1 Request timeout for icmp_seq 2 Request timeout for icmp_seq 3 Request timeout for icmp_seq 4 Request timeout for icmp_seq 5 Cheers, Mike
Re: [web2py] Idea on web server integration
I agree that Cherokee is an impressive server. I think the main reason for not including it is it's non-Pythonic nature. web2py would have to incorporate a formal build process (something it does not current have) for Windows and OSX. It's hard to find a recent Windows build of Cherokee right now as is. This would also remove the ability for web2py to run on Jython and Pypy (does it currently run on Pypy?). Currently, web2py is completely Python. It only relies on python modules. To move beyond that is a significant step that would add magnitudes of complexity to maintain the same level of features for a little performance gain and a pretty server interface. web2py advocates that advanced users should use the web-server that best fits their needs, but maintains a built-in server with an easy interface for beginners. -tim On 5/18/2010 7:12 AM, blackthorne wrote: hi I don't want to fill this groups with ideas, mainly with ideas that will never see light. Anyway, if someone has more free time than me, you may consider it. I was checking a screencast on the awesome Cherokee web server with it's great web interface and thinking how cool would it be to have a bundle of cherokee with web2py deployed. Actually, cherokee it's prepared for that. It has a set of wizards so you can easily deploy frameworks like this ( http://www.cherokee-project.com/doc/cookbook_ror.html ). A good integration of these things could allow you the full cycle of work since the download of the required tools, development, test, deploy just using a web browser available on any device these days! See it working at http://www.cherokee-project.com/screencasts.html .
Re: [web2py] Re: Idea on web server integration
Oh, well in that case, we just need someone to do it...go for it! On 5/18/2010 8:50 AM, blackthorne wrote: A second step would be to bundle PostgresSQL with web2py + cherokee. I'm a dreamer... On May 18, 2:46 pm, blackthornefrancisco@gmail.com wrote: I may no have been as clear as I wanted. First, this is not a Python / C / whatever issue. We like web2py and being pythonic, nothing changes. This is the application layer. The way it's served, wether it is web or telnet or something else it's another layer. There is absolutely no limitation on running different layers using different programming languages. I may be wrong but I believe that currently web2py just features a webserver to support its web based ide and testing. In no way you are suggested to deploy web2py with cherrypy or its new web server for a serious production environment. Instead, you are suggested to run it on Apache, lighthttpd and cherokee, things like that (as well as you have sqlite by default, but postgressql/... support for other ecosystems). Second, because these are different layers, you keep all the freedom. You can run web2py with cherokee using Python or in jython, Pypy if you can..., no glitches. I don't see a reason to make a difference, just because the web server as a different logo or uses other programming language. Third, I am not suggesting anything against the current model, and by no means I want to end it, I'm talking about a new option, something like what you have with Apache, MySQL, PHP - MAMP/WAMP/LAMP. So beginners and advanced users can be happy together... On May 18, 1:47 pm, Timothy Farrelltfarr...@swgen.com wrote: I agree that Cherokee is an impressive server. I think the main reason for not including it is it's non-Pythonic nature. web2py would have to incorporate a formal build process (something it does not current have) for Windows and OSX. It's hard to find a recent Windows build of Cherokee right now as is. This would also remove the ability for web2py to run on Jython and Pypy (does it currently run on Pypy?). Currently, web2py is completely Python. It only relies on python modules. To move beyond that is a significant step that would add magnitudes of complexity to maintain the same level of features for a little performance gain and a pretty server interface. web2py advocates that advanced users should use the web-server that best fits their needs, but maintains a built-in server with an easy interface for beginners. -tim On 5/18/2010 7:12 AM, blackthorne wrote: hi I don't want to fill this groups with ideas, mainly with ideas that will never see light. Anyway, if someone has more free time than me, you may consider it. I was checking a screencast on the awesome Cherokee web server with it's great web interface and thinking how cool would it be to have a bundle of cherokee with web2py deployed. Actually, cherokee it's prepared for that. It has a set of wizards so you can easily deploy frameworks like this (http://www.cherokee-project.com/doc/cookbook_ror.html ). A good integration of these things could allow you the full cycle of work since the download of the required tools, development, test, deploy just using a web browser available on any device these days! See it working athttp://www.cherokee-project.com/screencasts.html.
Re: [web2py] web2py 1.78.1 is OUT
- Rocket upgrade to 1.0.5 (fixes HTTPS connection problem) On 5/16/2010 12:14 AM, mdipierro wrote: Please check it changelog - new template system allows {{block name}}{{end}}, thanks Thadeus - fixed mime headers in emails, included PGP in emails, thanks Gyuris - automatic database retry connect when pooling and lost connections - OPTGROUP helper, thanks Iceberg - web2py_ajax_trap captures all form submissions, thank you Skiros - multicolumn checkwidget and arbitrary chars in multiple is_in_set, thanks hy - Québécois for welcome, thanks Chris - crud.search(), thanks Mr Freeze - DAL(...migrate,fake_migrate), thanks Thadeus
Re: [web2py] Re: web2py 1.78.2
I see this Rocket error. That error is normal in the course of operations but should never be detected through web2py. Did you get that traceback from a ticket or somewhere else? How does this error relate to the messages you sent before? Do they happen at the same time? -tim On 5/17/2010 2:23 AM, szimszon wrote: default/index.html: --- cut - {{extend 'layout.html'}} {{try:}}{{=H2(message)}}{{except:}}{{=BEAUTIFY(response._vars)}} {{pass}} h3{{=T('Changes not in use:')}}/h3 {{changes=db(db.web.modified==True).select(db.web.id,db.web.name,db.web.controller) if len(changes)0: for douse in changes: =XML('[%s]br/'%A(T('Modified %(name)s config, use it!',dict(name=douse.name)),_href=URL(r=request,c=douse.controller,f='webdouse',args=douse.id))) pass else: =T('Web Nothing') pass}} br / {{changes=db(db.dns.modified==True).select(db.dns.id,db.dns.name,db.dns.controller) if len(changes)0: for douse in changes: =XML('[%s]br/'%A(T('Modified %(name)s config, use it!',dict(name=douse.name)),_href=URL(r=request,c=douse.controller,f='dnsdouse',args=douse.id))) pass else: =T('DNS Nothing') pass}} --- cut - Ticket 127.0.0.1.2010-05-17.09-20-49.56d45b51-05f0-49b5-9b10- cd7e9a3212a6 missing pass in view Error traceback Traceback (most recent call last): File /home/szimszon/fejlesztes/sajat/web2py/gluon/rocket.py, line 769, in run self.run_app(conn) File /home/szimszon/fejlesztes/sajat/web2py/gluon/rocket.py, line 1172, in run_app self.environ = environ = self.build_environ(sock_file, conn) File /home/szimszon/fejlesztes/sajat/web2py/gluon/rocket.py, line 1008, in build_environ request = self.read_request_line(sock_file) File /home/szimszon/fejlesztes/sajat/web2py/gluon/rocket.py, line 834, in read_request_line raise SocketTimeout(Socket timed out before request.) SocketTimeout: Socket timed out before request.
Re: [web2py] SSL is OFF error message when starting the server
As of version 1.77.3, web2py depends on the ssl package for HTTPS support. It no longer uses the pyOpenSSL package. You can get ssl for Python 2.3-2.5 from the cheeseshop. -tim On 5/13/2010 4:29 PM, OMAR wrote: I have web2py installed on a remote Debian server. When connecting via my local Windows box, the admin is disabled for Web2py because of the unsecure channel. I set up an SSH tunnel for the connection, and I've created a private certificate authority for the SSL connection. When starting the server (the included web2py server) I'm passing the path to the path to the certificates via command line switches, but get the following error message: WARNING:root:Python ssl module unavailable. SSL is OFF Next, on the Debian box I installed python-openssl Where to go from here. How to turn on SSL? I followed this helpful blog post http://skoroneos.blogspot.com/2010/01/web2py-getting-admin-panel-to-work.html but my results were not the same. Thanks in advance for any help. I look forward to learning web2py and being part of this community. I just can't seem to get started with the admin.
Re: [web2py] Re: SSL Error on windows [SOLVED]
The only question is: how do you want that to look? All web2py interfaces currently only take one IP and socket number. I don't think it's wise to assume that if someone wants HTTPS they automatically want HTTP as well (and pick the port for them). You decide how you want the Tk frontend, the options.py file and the command-line to handle it and I can adapt those to send it to Rocket. My recommendation would be to only change the options file to allow for multiple interfaces. I'm inclined to think that very few people run production web2py from the Tk interface. -tim On 5/13/2010 3:12 PM, mdipierro wrote: Since rocket does it, is there any way we can add support for 80+443 with one rocket and one web2py instance? On May 13, 3:02 pm, Timothy Farrelltfarr...@swgen.com wrote: While Rocket supports listening on multiple sockets, web2py does not. You will need to run two separate instances of web2py (one for SSL, one unencrypted) to do what you are asking. -tim On 5/13/2010 1:40 PM, Miguel Lopes wrote: On Wed, May 12, 2010 at 7:45 PM, Timothy Farrelltfarr...@swgen.com mailto:tfarr...@swgen.com wrote: This is the error that Jon Lundell's guys found already. Note that it's trying to connect to port 8000 as HTTP. Connect as HTTPS and it should work. Also try upgrading to trunk, that should issue a 400 Bad Request. -tim Confirmed. Updated from trunk to 1.77.3 and if attempting to access the server in http (instead of https) server issues console warning like you said. Since I'm on a LAN I installed SSL as a learning experience and to access the admin interface anywhere on the LAN. However, now that I have web2py running with SSL, even the applications must be accessed via SSL. I expected that only the admin would require SSL. Is this also a matter of configuration or is there some other reason? I do have very little knowledge on networks and deployment in general. So I wonder what is the reason. Miguel
Re: [web2py] Re: SSL Error on windows [SOLVED]
While Rocket supports listening on multiple sockets, web2py does not. You will need to run two separate instances of web2py (one for SSL, one unencrypted) to do what you are asking. -tim On 5/13/2010 1:40 PM, Miguel Lopes wrote: On Wed, May 12, 2010 at 7:45 PM, Timothy Farrell tfarr...@swgen.com mailto:tfarr...@swgen.com wrote: This is the error that Jon Lundell's guys found already. Note that it's trying to connect to port 8000 as HTTP. Connect as HTTPS and it should work. Also try upgrading to trunk, that should issue a 400 Bad Request. -tim Confirmed. Updated from trunk to 1.77.3 and if attempting to access the server in http (instead of https) server issues console warning like you said. Since I'm on a LAN I installed SSL as a learning experience and to access the admin interface anywhere on the LAN. However, now that I have web2py running with SSL, even the applications must be accessed via SSL. I expected that only the admin would require SSL. Is this also a matter of configuration or is there some other reason? I do have very little knowledge on networks and deployment in general. So I wonder what is the reason. Miguel
Re: [web2py] Re: SSL Error on windows
This is the error that Jon Lundell's guys found already. Note that it's trying to connect to port 8000 as HTTP. Connect as HTTPS and it should work. Also try upgrading to trunk, that should issue a 400 Bad Request. -tim On 5/12/2010 1:32 PM, mdipierro wrote: yes please On May 12, 1:16 pm, Miguel Lopesmig.e.lo...@gmail.com wrote: On Tue, May 11, 2010 at 9:41 PM, mr.freezenat...@freezable.com wrote: Do you have the win32 extension for Python installed? http://sourceforge.net/projects/pywin32/ On May 11, 3:33 pm, Miguel Lopesmig.e.lo...@gmail.com wrote: On Tue, May 11, 2010 at 7:54 PM, mdipierromdipie...@cs.depaul.edu wrote: This is concerns me more: WARNING:root:WEB2PY CRON: Disabled because no file locking what os are you using? Windows XP I can check the flavour and service pack tomorrow. I confirm that this error disapers when pywin32 extensions are installed. If this is the case, then maybe pywin32 should be listed as a dependency. Unfortunately the SSL problems are an independent issue. Now I get: C:\Programas\web2pyC:\Python26\python web2py.py -L options web2py Enterprise Web Framework Created by Massimo Di Pierro, Copyright 2007-2010 Version 1.77.3 (2010-04-20 02:48:54) Database drivers available: SQLite3, PostgreSQL Starting hardcron... please visit: http://Tecnicon-s3:8000http://tecnicon-s3:8000/ use kill -SIGTERM 832 to shutdown the web2py server ERROR:Rocket.Errors.ThreadPool:Traceback (most recent call last): File C:\Programas\web2py\gluon\rocket.py, line 300, in start self._threadpool.queue.put((l.accept(), File C:\Python26\lib\ssl.py, line 326, in accept suppress_ragged_eofs=self.suppress_ragged_eofs), File C:\Python26\lib\ssl.py, line 118, in __init__ self.do_handshake() File C:\Python26\lib\ssl.py, line 293, in do_handshake self._sslobj.do_handshake() SSLError: [Errno 1] _ssl.c:480: error:1407609C:SSL routines:SSL23_GET_CLIENT_HEL LO:http request ERROR:Rocket.Errors.ThreadPool:Traceback (most recent call last): File C:\Programas\web2py\gluon\rocket.py, line 300, in start self._threadpool.queue.put((l.accept(), File C:\Python26\lib\ssl.py, line 326, in accept suppress_ragged_eofs=self.suppress_ragged_eofs), File C:\Python26\lib\ssl.py, line 118, in __init__ self.do_handshake() File C:\Python26\lib\ssl.py, line 293, in do_handshake self._sslobj.do_handshake() SSLError: [Errno 1] _ssl.c:480: error:1407609C:SSL routines:SSL23_GET_CLIENT_HEL LO:http request ERROR:Rocket.Errors.ThreadPool:Traceback (most recent call last): File C:\Programas\web2py\gluon\rocket.py, line 300, in start self._threadpool.queue.put((l.accept(), File C:\Python26\lib\ssl.py, line 326, in accept suppress_ragged_eofs=self.suppress_ragged_eofs), File C:\Python26\lib\ssl.py, line 118, in __init__ self.do_handshake() File C:\Python26\lib\ssl.py, line 293, in do_handshake self._sslobj.do_handshake() SSLError: [Errno 1] _ssl.c:480: error:1407609C:SSL routines:SSL23_GET_CLIENT_HEL LO:http request Perhaps I should try a CherryPy based release in order to exclude Rocket as a possible cause. Miguel
Re: [web2py] performance issue- multiple db connection
When you create your model, there is a pools parameter that defaults to 10. This means that the one web2py process will use a pool of 10 connections on that one database. It leaves the connections open even after the request is served so that they can serve the next connection without having to reconnect to the database. -tim On 5/11/2010 3:58 AM, vihang wrote: Hello, I am trying to understand the possible performance setback if I try to open multiple db connections. Is there some mechanism in web2py which would optimizes the number of open connections to the database? Vihang
Re: [web2py] Web2py crashing
Can you be more specific on what you mean by crashing? Interpreted languages shouldn't crash and generally if they do it's something wrong with the interpreter. Are you using cPython? On 5/7/2010 1:48 AM, David Zejda wrote: Hi, my web2py instance (about 1 pageviews, 30+ ajax requests daily) crashes about daily. As a workaround I have a script which (re)starts the server when either memory usage exceeds certain threshold or when the server is completely down. I run the script from cron every minute. #! /bin/sh A=`netstat -tlnp | grep 8000` TIME=`date` LOG='/var/log/web2py/keepalive.log' if [ $A ]; then B=`echo $A | cut -d -f 7` PID=${B%/*} MEM=`ps -p $PID -o vsz | tail -n 1` if [ $MEM -gt 200 ]; then echo $TIME $PID$MEMMEMORY $LOG echo Web2py memory $MEM on $TIME = restart. | mail m...@mail.com -s 'Web2py fail!' /etc/init.d/web2py restart else echo $TIME $PID$MEMOK $LOG fi else echo $TIME FAIL $LOG echo Web2py failed on $TIME | mail m...@mail.com -s 'Web2py fail!' /etc/init.d/web2py restart fi I know I should find time to try to examine cause of memory leaking with guppy-heapy. But I think the crashing is another issue, not directly related to the leaking. Access logs revealed no direct relation to any particular controller or function. Also, after web2py upgrade it has not changed. Do you have any idea how to reveal the cause of crashing? Thanks! David
Re: [web2py] Re: Web2py crashing
Is this standard hardware? The only place I've seen Python crash is on non-standard hardware (AS400) with a non-supported build of Python. Web2py recent switched from Cherrypy's wsgiserver to Rocket (which I wrote) as of version 1.77.2 (I think). Which version are you running? With built-in web-servers, the listening for connections and the response processing all happens in the same Linux Process. So if it stops listening, do you still see the process in 'top' or 'px ax'? If so, then, Yes, the whole process crashed (in which case it is more likely the Python interpreter); otherwise, there would likely be a bug somewhere in web2py that we can address. You could also try Apache+mod_wsgi to see if that changes things. -tim On 5/7/2010 8:36 AM, David Zejda wrote: AFAIK web2py uses cherrypy webserver, which listens as a daemon on certain port. With crashing I mean that the listening process (web2py with cherrypy at the background) suddenly terminates. I use standard Python v 2.5.2 as packaged for Debian. David On May 7, 2:52 pm, Timothy Farrelltfarr...@swgen.com wrote: Can you be more specific on what you mean by crashing? Interpreted languages shouldn't crash and generally if they do it's something wrong with the interpreter. Are you using cPython? On 5/7/2010 1:48 AM, David Zejda wrote: Hi, my web2py instance (about 1 pageviews, 30+ ajax requests daily) crashes about daily. As a workaround I have a script which (re)starts the server when either memory usage exceeds certain threshold or when the server is completely down. I run the script from cron every minute. #! /bin/sh A=`netstat -tlnp | grep 8000` TIME=`date` LOG='/var/log/web2py/keepalive.log' if [ $A ]; then B=`echo $A | cut -d -f 7` PID=${B%/*} MEM=`ps -p $PID -o vsz | tail -n 1` if [ $MEM -gt 200 ]; then echo $TIME $PID$MEMMEMORY$LOG echo Web2py memory $MEM on $TIME =restart. | mail m...@mail.com -s 'Web2py fail!' /etc/init.d/web2py restart else echo $TIME $PID$MEMOK$LOG fi else echo $TIME FAIL$LOG echo Web2py failed on $TIME | mail m...@mail.com -s 'Web2py fail!' /etc/init.d/web2py restart fi I know I should find time to try to examine cause of memory leaking with guppy-heapy. But I think the crashing is another issue, not directly related to the leaking. Access logs revealed no direct relation to any particular controller or function. Also, after web2py upgrade it has not changed. Do you have any idea how to reveal the cause of crashing? Thanks! David
Re: [web2py] to Tim Farrell
Let's talk more about this off-list. -tim On 5/5/2010 5:02 PM, elffikk wrote: hi, this is not related to web2py, just to rocket I just got trac running with Rocket. Performance is great! But one thing that I need is authentication using at least basic auth, since trac is relying on web server authentication anyone can help with that? seems that cherrypy does it and (nothing bad, I think): I installed this version http://pypi.python.org/pypi/rocket/1.0.4 but on your website (https://launchpad.net/rocket) latest is 1.0.3 thank you in advance
Re: [web2py] Re: Houston, Houston, the rocket lost contact!
The main change between the two versions is where it applies the SSL connection and adds a check to see if that connection isn't there when it should be. I've updated to the latest hg and I'm not seeing what you guys are seeing. Are any of you running HTTPS? Rocket does not support IPV6 yet. -tim On 5/2/2010 12:10 PM, Iceberg wrote: Sorry, Cjrh, the tip doesn't help. To summarize: 1) Both http://localhost:8000 and http://127.0.0.1:8000 work when I am using old rocket.py, and I just double confirm my hosts file contains 127.0.0.1 localhost since long long ago. 2) Neither http://localhost:8000 nor http://127.0.0.1:8000 works with latest rocket.py Actually I took a glance into the diff between latest two rockets. They look significantly different, but I could not trace down to certain line yet. It is rocket science after all. :-) Sos, Sos... On May2日, 5:57am, mdipierromdipie...@cs.depaul.edu wrote: @Iceberg, does the suggestion below fix the problem? @Tim. Does Rocket support IPV6 addresses? Massimo On May 1, 4:31 pm, cjrhcaleb.hatti...@gmail.com wrote: On May 1, 1:36 pm, Icebergiceb...@21cn.com wrote: please visit: http://127.0.0.1:8000 and The console output is as usual. But we only get 400 Bad Request fromhttp://localhost:8000 http://mwolk.com/blog/localhost-not-working-but-127001-does/
Re: [web2py] Re: Houston, Houston, the rocket lost contact!
To help me debug this, would one of you do the following: Add some code at line 99: print ssl: , self.ssl print secure: , self.secure These two values should, in all cases be the same. If they are not, you'll get a 400. If you're seeing this error, it means one or the other is not what it should be. Please tell me which one. Thanks, -tim On 5/3/2010 7:54 AM, Timothy Farrell wrote: The main change between the two versions is where it applies the SSL connection and adds a check to see if that connection isn't there when it should be. I've updated to the latest hg and I'm not seeing what you guys are seeing. Are any of you running HTTPS? Rocket does not support IPV6 yet. -tim On 5/2/2010 12:10 PM, Iceberg wrote: Sorry, Cjrh, the tip doesn't help. To summarize: 1) Both http://localhost:8000 and http://127.0.0.1:8000 work when I am using old rocket.py, and I just double confirm my hosts file contains 127.0.0.1 localhost since long long ago. 2) Neither http://localhost:8000 nor http://127.0.0.1:8000 works with latest rocket.py Actually I took a glance into the diff between latest two rockets. They look significantly different, but I could not trace down to certain line yet. It is rocket science after all. :-) Sos, Sos... On May2日, 5:57am, mdipierromdipie...@cs.depaul.edu wrote: @Iceberg, does the suggestion below fix the problem? @Tim. Does Rocket support IPV6 addresses? Massimo On May 1, 4:31 pm, cjrhcaleb.hatti...@gmail.com wrote: On May 1, 1:36 pm, Icebergiceb...@21cn.com wrote: please visit: http://127.0.0.1:8000 and The console output is as usual. But we only get 400 Bad Request fromhttp://localhost:8000 http://mwolk.com/blog/localhost-not-working-but-127001-does/
Re: [web2py] Re: Houston, Houston, the rocket lost contact!
So changing line 86 from ssl = None to ssl = False should take care of it. -tim On 5/3/2010 10:58 AM, Iceberg wrote: I got same output as Nathan (Mr. Freeze). The ssl=None seems because my python2.5 on Windows contains no ssl module at all. On May3, 11:30pm, mr.freezenat...@freezable.com wrote: I get: ssl: None secure: False On May 3, 8:11 am, Timothy Farrelltfarr...@swgen.com wrote: To help me debug this, would one of you do the following: Add some code at line 99: print ssl: , self.ssl print secure: , self.secure These two values should, in all cases be the same. If they are not, you'll get a 400. If you're seeing this error, it means one or the other is not what it should be. Please tell me which one. Thanks, -tim On 5/3/2010 7:54 AM, Timothy Farrell wrote: The main change between the two versions is where it applies the SSL connection and adds a check to see if that connection isn't there when it should be. I've updated to the latest hg and I'm not seeing what you guys are seeing. Are any of you running HTTPS? Rocket does not support IPV6 yet. -tim On 5/2/2010 12:10 PM, Iceberg wrote: Sorry, Cjrh, the tip doesn't help. To summarize: 1) Bothhttp://localhost:8000andhttp://127.0.0.1:8000workwhen I am using old rocket.py, and I just double confirm my hosts file contains 127.0.0.1 localhost since long long ago. 2) Neitherhttp://localhost:8000norhttp://127.0.0.1:8000workswith latest rocket.py Actually I took a glance into the diff between latest two rockets. They look significantly different, but I could not trace down to certain line yet. It is rocket science after all. :-) Sos, Sos... On May2日, 5:57am, mdipierromdipie...@cs.depaul.eduwrote: @Iceberg, does the suggestion below fix the problem? @Tim. Does Rocket support IPV6 addresses? Massimo
Re: [web2py] Re: Houston, Houston, the rocket lost contact!
Good enough for me. Let's call that the fix. --tim On 5/3/2010 12:02 PM, mr.freeze wrote: No luck. Changing it has no effect. The debug still prints: ssl: None secure: False If I change at line 83 to: try: import ssl has_ssl = True except ImportError: has_ssl = False and line 97 to: self.ssl = has_ssl and isinstance(self.socket, ssl.SSLSocket) it works. On May 3, 11:41 am, Timothy Farrelltfarr...@swgen.com wrote: So changing line 86 from ssl = None to ssl = False should take care of it. -tim On 5/3/2010 10:58 AM, Iceberg wrote: I got same output as Nathan (Mr. Freeze). The ssl=None seems because my python2.5 on Windows contains no ssl module at all. On May3, 11:30pm, mr.freezenat...@freezable.comwrote: I get: ssl: None secure: False On May 3, 8:11 am, Timothy Farrelltfarr...@swgen.comwrote: To help me debug this, would one of you do the following: Add some code at line 99: print ssl: , self.ssl print secure: , self.secure These two values should, in all cases be the same. If they are not, you'll get a 400. If you're seeing this error, it means one or the other is not what it should be. Please tell me which one. Thanks, -tim On 5/3/2010 7:54 AM, Timothy Farrell wrote: The main change between the two versions is where it applies the SSL connection and adds a check to see if that connection isn't there when it should be. I've updated to the latest hg and I'm not seeing what you guys are seeing. Are any of you running HTTPS? Rocket does not support IPV6 yet. -tim On 5/2/2010 12:10 PM, Iceberg wrote: Sorry, Cjrh, the tip doesn't help. To summarize: 1) Bothhttp://localhost:8000andhttp://127.0.0.1:8000workwhenI am using old rocket.py, and I just double confirm my hosts file contains 127.0.0.1 localhost since long long ago. 2) Neitherhttp://localhost:8000norhttp://127.0.0.1:8000workswith latest rocket.py Actually I took a glance into the diff between latest two rockets. They look significantly different, but I could not trace down to certain line yet. It is rocket science after all. :-) Sos, Sos... On May2日, 5:57am, mdipierromdipie...@cs.depaul.edu wrote: @Iceberg, does the suggestion below fix the problem? @Tim. Does Rocket support IPV6 addresses? Massimo
Re: [web2py] Re: Rocket issues
Thanks. I'll look into these today. On 4/28/2010 9:10 AM, mdipierro wrote: I am sure Tim is on the case. On Apr 28, 8:56 am, Jonathan Lundelljlund...@pobox.com wrote: Our engineering folks have started looking at the new release, with attention to Rocket, and have reported a couple of problems. 1) when https is enabled, but a connection is attempted to http, CherryPy (?) will return a message indicating this server operates on https only. The new version, Rocket, does not, and the browser appears to spin waiting for a response. 2) if a localhost managed server is configured using the same port as [web2py], but http protocol, atttempting to connect to that URL will cause [web2py] to become unresponsive to all requests until it is restarted. With the same configuration, prior versions will display an unable to obtain API version warning, but will remain functional. The configuration attempted was: Name: localhost Description: Localhost URL:http://127.0.0.1:8004 I believe that by managed server they mean a copy of Apache; we tend to run multiple copies of Apache at different ports. I'm a little confused by #2 myself, and will get clarification, but perhaps it makes sense to Tim.
Re: [web2py] Rocket issues
It sounds to me like these two issues are really one. Basically, Rocket is not sending an HTTP response when in HTTPS mode. It closes the socket but (for some reason) Python doesn't close it immediately. This causes a client to hang for a while. Thanks for the clarification. Jon, if it's ok with you can I send you test versions? -tim On 4/28/2010 4:38 PM, Jonathan Lundell wrote: On Apr 28, 2010, at 8:48 AM, Jonathan Lundell wrote: On Apr 28, 2010, at 6:56 AM, Jonathan Lundell wrote: 2) if a localhost managed server is configured using the same port as [web2py], but http protocol, atttempting to connect to that URL will cause [web2py] to become unresponsive to all requests until it is restarted. With the same configuration, prior versions will display an unable to obtain API version warning, but will remain functional. The configuration attempted was: Name: localhost Description: Localhost URL: http://127.0.0.1:8004 OK, I have a clarification on this one. I had misinterpreted the report. In the above case, web2py is configured as https-only, port 8004. The web2py app is configured to *talk* to another (non-web2py) entity at http://localhost:8004. This is a conflict, of course. But with CherryPy, the communication simply failed (resulting in the 'API version' message above; I'll try to find out what the underlying error was). With Rocket, web2py becomes unresponsive and has to be restarted. More data. It seems that CherryPy explicitly detects an attempt to make an http connection to its https socket and sends back a 400 Bad Request (which I'm seeing). If you're poking around in CherryPy, the key bit of code is this: if thirdarg == 'http request': # The client is talking HTTP to an HTTPS server. raise NoSSLError() ...and you can see how it deals with NoSSLError elsewhere. My impression is that Rocket simply closes the connection, but a) I could be wrong, and b) whatever is going on isn't enough. Try this simple test: start web2py/rocket in SSL mode, and then use Firefox or Safari (all I've tried it with) to connect to that port with http. You should see the browser hang. Well, you shouldn't, really, but you will. I think. At this point, I'm sort of stuck. I'd like to upgrade web2py for an upcoming release, but I can't.
Re: [web2py] Rocket issues
To those reading. I've submitted a fix to Massimo that Jonathan's engineers have tested (we should all have engineers =) ). There's one question that remains. Is this serious enough for an immediate web2py bugfix release? I don't think so. -tim On 4/29/2010 9:07 AM, Jonathan Lundell wrote: On Apr 29, 2010, at 5:58 AM, Timothy Farrell wrote: It sounds to me like these two issues are really one. Basically, Rocket is not sending an HTTP response when in HTTPS mode. It closes the socket but (for some reason) Python doesn't close it immediately. This causes a client to hang for a while. Thanks for the clarification. Jon, if it's ok with you can I send you test versions? Yes, I agree that they seem to be the same, and yes, please send me test versions. Thanks.
Re: [web2py] Re: fatal bug in 1.77.3
Let us know if it comes up again. -tim On 4/27/2010 1:30 AM, hywang wrote: when i try it again today, everything is ok today. I don't know why :-( On 4月26日, 下午11时42分, mdipierromdipie...@cs.depaul.edu wrote: I cannot reproduce this either. It is not an internationalization issue. I suspect something else in the code is causing this. We need to see at the entire code. On Apr 26, 10:37 am, Timothy Farrelltfarr...@swgen.com wrote: My assumption that web2py is returning something other than a list comes from the traceback. Why would calling: len(returned_obj) go into the cgi module if it was a string? Rocket alone does not use the cgi module at all so the returned object must be related to it somehow. We know that lists that contain strings do not relate to the cgi module. All that aside, there's something more going on here. I've plugged hwangs code into a test application here and could not reproduce the problematic behavior. The only changes I made to the code posted was changing request.flash = 'ok' to response.flash = 'ok' and adding a db = DAL('sqlite://storage.db') to the model file. Could there be a i18n/l10n issue here? -tim On 4/26/2010 9:16 AM, mdipierro wrote: I think we need some debugging. His code is def hello(): form = SQLFORM(db.easy_test) if form.accepts(request.vars, session): request.flash = 'ok' return dict(form=form) and web2py returns a list with a string in this case (the generic view that renders the dict()). I do not see how web2py can return anything else. On Apr 26, 8:04 am, Timothy Farrelltfarr...@swgen.comwrote: Massimo, I know you sent me an email on this but I can't find it so I'll just reply to the list. Rocket is dying in this case because the object it has received from web2py is not a valid WSGI response. A valid WSGI response must be either a list or generator (Rocket is a little more tolerant and will accept a string as well). But in this case it seems to be getting some form of a cgi.FieldStorage type as evidenced by the traceback going into the cgi module when Rocket tries to read the length of the returned object. Massimo, I've seen the web2py code that it normally scrubs returned objects. This was a while ago and may have changed since then. Rocket could die a little more gracefully, but I'd rather keep the code lean rather than checking every response for validity. As a test, there is a WSGI validator in the wsgiref module that works as middleware. You might hook that up to see what is really coming back. -tim On 4/26/2010 1:53 AM, hywang wrote: i has no view . when i test newest version in google hg server, web2py works well, but if I add IS_IMAGE() validator, some error occured again. ver1.6x works well On 4 26 , 2ʱ01 , mdipierromdipie...@cs.depaul.eduwrote: Do you have a view with a custom form? On Apr 25, 10:53 pm, hywangwhy00...@163.comwrote: I run web2py from source on centos 5.3. When upload a file, an error occurs. -db.py--- db.define_table('easy_test', Field('picture', 'upload') ) -controller file--- def hello(): form = SQLFORM(db.easy_test) if form.accepts(request.vars, session): request.flash = 'ok' return dict(form=form) when submit the form, it returns 'server error' consel error msg : ERROR:Rocket.Errors.Thread-3:Traceback (most recent call last): File E:\web2py\gluon\rocket.py, line 747, in run self.run_app(conn) File E:\web2py\gluon\rocket.py, line 1162, in run_app sections = len(output) File C:\Python25\lib\cgi.py, line 633, in __len__ return len(self.keys()) File C:\Python25\lib\cgi.py, line 609, in keys raise TypeError, not indexable TypeError: not indexable -- Subscription settings:http://groups.google.com/group/web2py/subscribe?hl=en
Re: [web2py] Re: fatal bug in 1.77.3
I didn't originally, but did after you mentioned it. It worked both ways for me. On 4/27/2010 8:56 AM, mdipierro wrote: Tim, did you try with the IS_IMAGE validator? On Apr 27, 7:56 am, Timothy Farrelltfarr...@swgen.com wrote: Let us know if it comes up again. -tim On 4/27/2010 1:30 AM, hywang wrote: when i try it again today, everything is ok today. I don't know why :-( On 4月26日, 下午11时42分, mdipierromdipie...@cs.depaul.eduwrote: I cannot reproduce this either. It is not an internationalization issue. I suspect something else in the code is causing this. We need to see at the entire code. On Apr 26, 10:37 am, Timothy Farrelltfarr...@swgen.comwrote: My assumption that web2py is returning something other than a list comes from the traceback. Why would calling: len(returned_obj) go into the cgi module if it was a string? Rocket alone does not use the cgi module at all so the returned object must be related to it somehow. We know that lists that contain strings do not relate to the cgi module. All that aside, there's something more going on here. I've plugged hwangs code into a test application here and could not reproduce the problematic behavior. The only changes I made to the code posted was changing request.flash = 'ok' to response.flash = 'ok' and adding a db = DAL('sqlite://storage.db') to the model file. Could there be a i18n/l10n issue here? -tim On 4/26/2010 9:16 AM, mdipierro wrote: I think we need some debugging. His code is def hello(): form = SQLFORM(db.easy_test) if form.accepts(request.vars, session): request.flash = 'ok' return dict(form=form) and web2py returns a list with a string in this case (the generic view that renders the dict()). I do not see how web2py can return anything else. On Apr 26, 8:04 am, Timothy Farrelltfarr...@swgen.com wrote: Massimo, I know you sent me an email on this but I can't find it so I'll just reply to the list. Rocket is dying in this case because the object it has received from web2py is not a valid WSGI response. A valid WSGI response must be either a list or generator (Rocket is a little more tolerant and will accept a string as well). But in this case it seems to be getting some form of a cgi.FieldStorage type as evidenced by the traceback going into the cgi module when Rocket tries to read the length of the returned object. Massimo, I've seen the web2py code that it normally scrubs returned objects. This was a while ago and may have changed since then. Rocket could die a little more gracefully, but I'd rather keep the code lean rather than checking every response for validity. As a test, there is a WSGI validator in the wsgiref module that works as middleware. You might hook that up to see what is really coming back. -tim On 4/26/2010 1:53 AM, hywang wrote: i has no view . when i test newest version in google hg server, web2py works well, but if I add IS_IMAGE() validator, some error occured again. ver1.6x works well On 4 26 , 2ʱ01 , mdipierromdipie...@cs.depaul.edu wrote: Do you have a view with a custom form? On Apr 25, 10:53 pm, hywangwhy00...@163.com wrote: I run web2py from source on centos 5.3. When upload a file, an error occurs. -db.py--- db.define_table('easy_test', Field('picture', 'upload') ) -controller file--- def hello(): form = SQLFORM(db.easy_test) if form.accepts(request.vars, session): request.flash = 'ok' return dict(form=form) when submit the form, it returns 'server error' consel error msg : ERROR:Rocket.Errors.Thread-3:Traceback (most recent call last): File E:\web2py\gluon\rocket.py, line 747, in run self.run_app(conn) File E:\web2py\gluon\rocket.py, line 1162, in run_app sections = len(output) File C:\Python25\lib\cgi.py, line 633, in __len__ return len(self.keys()) File C:\Python25\lib\cgi.py, line 609, in keys raise TypeError, not indexable TypeError: not indexable -- Subscription settings:http://groups.google.com/group/web2py/subscribe?hl=en
Re: [web2py] Re: fatal bug in 1.77.3
Massimo, I know you sent me an email on this but I can't find it so I'll just reply to the list. Rocket is dying in this case because the object it has received from web2py is not a valid WSGI response. A valid WSGI response must be either a list or generator (Rocket is a little more tolerant and will accept a string as well). But in this case it seems to be getting some form of a cgi.FieldStorage type as evidenced by the traceback going into the cgi module when Rocket tries to read the length of the returned object. Massimo, I've seen the web2py code that it normally scrubs returned objects. This was a while ago and may have changed since then. Rocket could die a little more gracefully, but I'd rather keep the code lean rather than checking every response for validity. As a test, there is a WSGI validator in the wsgiref module that works as middleware. You might hook that up to see what is really coming back. -tim On 4/26/2010 1:53 AM, hywang wrote: i has no view . when i test newest version in google hg server, web2py works well, but if I add IS_IMAGE() validator, some error occured again. ver1.6x works well On 4月26日, 下午2时01分, mdipierro mdipie...@cs.depaul.edu wrote: Do you have a view with a custom form? On Apr 25, 10:53 pm, hywang why00...@163.com wrote: I run web2py from source on centos 5.3. When upload a file, an error occurs. -db.py--- db.define_table('easy_test', Field('picture', 'upload') ) -controller file--- def hello(): form = SQLFORM(db.easy_test) if form.accepts(request.vars, session): request.flash = 'ok' return dict(form=form) when submit the form, it returns 'server error' consel error msg : ERROR:Rocket.Errors.Thread-3:Traceback (most recent call last): File E:\web2py\gluon\rocket.py, line 747, in run self.run_app(conn) File E:\web2py\gluon\rocket.py, line 1162, in run_app sections = len(output) File C:\Python25\lib\cgi.py, line 633, in __len__ return len(self.keys()) File C:\Python25\lib\cgi.py, line 609, in keys raise TypeError, not indexable TypeError: not indexable -- Subscription settings:http://groups.google.com/group/web2py/subscribe?hl=en
Re: [web2py] Re: fatal bug in 1.77.3
My assumption that web2py is returning something other than a list comes from the traceback. Why would calling: len(returned_obj) go into the cgi module if it was a string? Rocket alone does not use the cgi module at all so the returned object must be related to it somehow. We know that lists that contain strings do not relate to the cgi module. All that aside, there's something more going on here. I've plugged hwangs code into a test application here and could not reproduce the problematic behavior. The only changes I made to the code posted was changing request.flash = 'ok' to response.flash = 'ok' and adding a db = DAL('sqlite://storage.db') to the model file. Could there be a i18n/l10n issue here? -tim On 4/26/2010 9:16 AM, mdipierro wrote: I think we need some debugging. His code is def hello(): form = SQLFORM(db.easy_test) if form.accepts(request.vars, session): request.flash = 'ok' return dict(form=form) and web2py returns a list with a string in this case (the generic view that renders the dict()). I do not see how web2py can return anything else. On Apr 26, 8:04 am, Timothy Farrelltfarr...@swgen.com wrote: Massimo, I know you sent me an email on this but I can't find it so I'll just reply to the list. Rocket is dying in this case because the object it has received from web2py is not a valid WSGI response. A valid WSGI response must be either a list or generator (Rocket is a little more tolerant and will accept a string as well). But in this case it seems to be getting some form of a cgi.FieldStorage type as evidenced by the traceback going into the cgi module when Rocket tries to read the length of the returned object. Massimo, I've seen the web2py code that it normally scrubs returned objects. This was a while ago and may have changed since then. Rocket could die a little more gracefully, but I'd rather keep the code lean rather than checking every response for validity. As a test, there is a WSGI validator in the wsgiref module that works as middleware. You might hook that up to see what is really coming back. -tim On 4/26/2010 1:53 AM, hywang wrote: i has no view . when i test newest version in google hg server, web2py works well, but if I add IS_IMAGE() validator, some error occured again. ver1.6x works well On 4 26 , 2ʱ01 , mdipierromdipie...@cs.depaul.edu wrote: Do you have a view with a custom form? On Apr 25, 10:53 pm, hywangwhy00...@163.com wrote: I run web2py from source on centos 5.3. When upload a file, an error occurs. -db.py--- db.define_table('easy_test', Field('picture', 'upload') ) -controller file--- def hello(): form = SQLFORM(db.easy_test) if form.accepts(request.vars, session): request.flash = 'ok' return dict(form=form) when submit the form, it returns 'server error' consel error msg : ERROR:Rocket.Errors.Thread-3:Traceback (most recent call last): File E:\web2py\gluon\rocket.py, line 747, in run self.run_app(conn) File E:\web2py\gluon\rocket.py, line 1162, in run_app sections = len(output) File C:\Python25\lib\cgi.py, line 633, in __len__ return len(self.keys()) File C:\Python25\lib\cgi.py, line 609, in keys raise TypeError, not indexable TypeError: not indexable -- Subscription settings:http://groups.google.com/group/web2py/subscribe?hl=en
Re: [web2py] Re: rocket performance
This is the first I'd heard of x-sendfile so I looked it up. It seems to work to off-load work from the application server to the web-server for serving large files. In theory, there would be no real benefit from this in Rocket since Rocket and web2py run in the same process. Serving a file from disk is hardly a CPU-intensive process for a threaded system. The only benefit would be to allow the GC to collect some of the request environment stuff earlier. I can't see this having a measurable benefit. For Apache and LightTPd, it makes a more sense when the app-server runs in a different process. -tim On 4/22/2010 11:11 AM, Thadeus Burgess wrote: I know I have been talking about x-sendfile alot lately Is there any reason that rocket should support it? -- Thadeus On Tue, Apr 20, 2010 at 4:06 PM, mdipierromdipie...@cs.depaul.edu wrote: ok. will fix this soon. On Apr 20, 4:03 pm, Timothy Farrelltfarr...@swgen.com wrote: Ton's of references in epydoc. Those will be there as long as wsgiserver.py is in the distro. Otherwise, run epydoc and sphinx. Other than that, theres: \examples\views\default\index.html:line 35 - change link tohttp://launchpad.net/rocket \examples\views\default\who.html:line 77 - remove the reference so long as wsgiserver is not the default - add liRocket Web Server developed by Timothy Farrell./li On 4/20/2010 9:21 AM, mdipierro wrote: I made a mistake. Left references to cherry in some of the pages in applications/example. Could you help me locate them and suggest changes? Massimo On Apr 20, 8:11 am, Timothy Farrelltfarr...@swgen.comwrote: Thank you. It's always good to see the fruits of one's labor come out. On 4/19/2010 3:57 PM, elffikk wrote: a simple test loading one by one the same link, leaving concurrency and advanced testing to Tim and others :) just wanted to feel the improvement, and I have to say Tim did his job very well web2py 1.76.5 vs 1.77.1 load test 10 requests: 1.76.5 - 0.3016 seconds 1.77.1 - 0.2736 seconds 100 requests: 1.76.5 - 1.7729 seconds 1.77.1 - 1.4585 seconds 1000 requests: 1.76.5 - 16.6493 seconds 1.77.1 - 13.4033 seconds and here is the great test script :) import sys, urllib n = int((sys.argv[1:] or [10])[0]) s = 'http://127.0.0.1:8001/'#s = 'http://127.0.0.1:8002/' for i in xrange(n): urllib.urlopen(s).read() -- Subscription settings:http://groups.google.com/group/web2py/subscribe?hl=en
Re: [web2py] css-question: centering footer
That will center the contents within the div. However, the div auto-sizes to it's content unless you give it other style properties. You are assuming that your div is the full width of the browser window. To do what you want, set two more styles on the div: width: 100%; /* Force the width to take up all possible space */ margin: 10px auto; /* Set the side margins to be equal and fill all possible space. */ You shouldn't need the p tags. They only confuse the matter since you're doing direct formatting. -tim On 4/21/2010 6:10 AM, Johann Spies wrote: Can somebody explain to me why the following does not cause the copyright notice to be centered? div class=ez-box footer style=text-align: center; p Copyright Š 2009 - Powered bya href=http://www.web2py.com;web2py/a /p /div Regards Johann -- Subscription settings: http://groups.google.com/group/web2py/subscribe?hl=en
Re: [web2py] rocket performance
Thank you. It's always good to see the fruits of one's labor come out. On 4/19/2010 3:57 PM, elffikk wrote: a simple test loading one by one the same link, leaving concurrency and advanced testing to Tim and others :) just wanted to feel the improvement, and I have to say Tim did his job very well web2py 1.76.5 vs 1.77.1 load test 10 requests: 1.76.5 - 0.3016 seconds 1.77.1 - 0.2736 seconds 100 requests: 1.76.5 - 1.7729 seconds 1.77.1 - 1.4585 seconds 1000 requests: 1.76.5 - 16.6493 seconds 1.77.1 - 13.4033 seconds and here is the great test script :) import sys, urllib n = int((sys.argv[1:] or [10])[0]) s = 'http://127.0.0.1:8001/' # s = 'http://127.0.0.1:8002/' for i in xrange(n): urllib.urlopen(s).read() -- Subscription settings: http://groups.google.com/group/web2py/subscribe?hl=en
Re: [web2py] Re: rocket performance
Ton's of references in epydoc. Those will be there as long as wsgiserver.py is in the distro. Otherwise, run epydoc and sphinx. Other than that, theres: \examples\views\default\index.html:line 35 - change link to http://launchpad.net/rocket \examples\views\default\who.html:line 77 - remove the reference so long as wsgiserver is not the default - add liRocket Web Server developed by Timothy Farrell./li On 4/20/2010 9:21 AM, mdipierro wrote: I made a mistake. Left references to cherry in some of the pages in applications/example. Could you help me locate them and suggest changes? Massimo On Apr 20, 8:11 am, Timothy Farrelltfarr...@swgen.com wrote: Thank you. It's always good to see the fruits of one's labor come out. On 4/19/2010 3:57 PM, elffikk wrote: a simple test loading one by one the same link, leaving concurrency and advanced testing to Tim and others :) just wanted to feel the improvement, and I have to say Tim did his job very well web2py 1.76.5 vs 1.77.1 load test 10 requests: 1.76.5 - 0.3016 seconds 1.77.1 - 0.2736 seconds 100 requests: 1.76.5 - 1.7729 seconds 1.77.1 - 1.4585 seconds 1000 requests: 1.76.5 - 16.6493 seconds 1.77.1 - 13.4033 seconds and here is the great test script :) import sys, urllib n = int((sys.argv[1:] or [10])[0]) s = 'http://127.0.0.1:8001/'# s = 'http://127.0.0.1:8002/' for i in xrange(n): urllib.urlopen(s).read() -- Subscription settings:http://groups.google.com/group/web2py/subscribe?hl=en
Re: [web2py] Can't download file with IE8
Are you on a HTTPS connection? On 4/7/2010 6:29 AM, szimszon wrote: Hello, I have an Internet Explorer cannot download ...f783273687326762357523675236785237623786.pdf from some domain. Internet Explorer was not able to open this Internet site. The requested site is either unavailabla or cannot be found. Please try again later. With Chrome and FF it works. The file is in database and I use the download() function... -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py] Re: Can't download file with IE8
IE has a cache problem with HTTPS. I don't use the download function but this would apply if the download function doesn't handle it. I have this in my code in several places: # Die IE! Die! Die! Die! # ( http://support.microsoft.com/kb/323308 ) response.headers['Pragma']=private response.headers['Cache-Control']=private, must-revalidate Put that in before you call download(). Does that fix it? On 4/7/2010 10:03 AM, szimszon wrote: I use 1.76.5 and mod_wsgi... But the question about ssl... hmmm... I'll try some trick with IE8 to accept the cert first :-D I'll report back... On ápr. 7, 16:15, mdipierromdipie...@cs.depaul.edu wrote: Are you using 1.76.5 or earlier and the built-in web server? that is known to truncate large files over https. You should now have that problem with the web2py in trunk which uses rocket or if you use another web server. On Apr 7, 8:09 am, szimszonszims...@gmail.com wrote: yes On ápr. 7, 14:50, Timothy Farrelltfarr...@swgen.com wrote: Are you on a HTTPS connection? On 4/7/2010 6:29 AM, szimszon wrote: Hello, I have an Internet Explorer cannot download ...f783273687326762357523675236785237623786.pdf from some domain. Internet Explorer was not able to open this Internet site. The requested site is either unavailabla or cannot be found. Please try again later. With Chrome and FF it works. The file is in database and I use the download() function... -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py] Re: How to install and run web2py on Jython ?
I've looked at this problem extensively and I'm convinced that the solution is to re-implement template.py without complicated regexps or remove the claim of Jython support. The exact problem is related to the size of a view that is run through the template module. The re_strings as it is used in the parse() method is too complicated. A temporary solution is to comment out that line but templates will not render some Javascript properly. This is ultimately a bug in Java (not even Jython) but it officially has WONT-FIX status with Sun. On 4/7/2010 3:34 PM, Jonathan Lundell wrote: On Apr 7, 2010, at 12:44 PM, John Cobo wrote: I have not written any regular expressions. So far I am just trying to run the web2py welcome app. The only reg. exp. is what creates the welcome page view. No traceback? Thanks. On 7 Apr 2010 19:29, Jonathan Lundell jlund...@pobox.com mailto:jlund...@pobox.com wrote: On Apr 7, 2010, at 9:55 AM, JC11 wrote: I am getting the dreaded error: RuntimeError: maximum recursion depth exceeded I am using web2py vsn. 1.76.5, jython version 2.5.1 on Windows XP. I have altered the web2py 'welcome' application defaault controller to: return 'Hello World' rather than return dict(message=T('Hello World')). This solved the recursion problem, but only if one does not use web2py views :( I tried adding the following to the default controller, but it did not help. import sys sys.setrecursionlimit(2500) Any suggestions ? What's the regex that's causing the problem? On Apr 7, 4:16 pm, Jonathan Lundell jlund...@pobox.com mailto:jlund...@pobox.com wrote: On Apr 7, 2010, at 7:14 AM, mdipierro wrote: Some people have reported problems with Jython due to a bug in Java regex. I tried Jython2.5rc2 and it worked for me. Let us know. One or two of the regex patches a while back (URL checking IIRC) was aimed at preventing excessive backtracking under Jython. If anyone runs into that problem again, they should report it. I'm pretty sure I understand how to avoid at least the problem we had then, by making alternations mutually exclusive. On Apr 7, 6:14 am, JC11 john.c...@gmail.com mailto:john.c...@gmail.com wrote: Thanks, I am sure I searched in the 'book', how silly of me not to find it. What about Oracle and Jython ? The last line of the entrie reads: 'You will be able to use DAL('sqlite://...') and DAL('postgres://...') only.' John C. On Apr 7, 11:54 am, Kuba Kucharski kuba.kuchar...@gmail.com mailto:kuba.kuchar...@gmail.com wrote: Hi, here they are: http://web2py.com/book/default/section/12/9 + use newest stable -- Kuba -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web2py@googlegroups.com mailto:web2py@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com mailto:web2py%2bunsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web2py@googlegroups.com mailto:web2py@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com mailto:web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py] Re: webserver slow, misreported
You are right, I was going to add that feature and then forgot about it. Someone reported a PyPI bug over the weekend (it would not affect web2py). I'll see if I can make the logging a bit more flexible and release a 1.1 in the next few days. In the meantime, look into the cron thing. -tim On 4/4/2010 6:44 PM, Michael Toomim wrote: I see, thank you. I want to measure the web server's response time when I deploy this on turk... Unfortunately the rocket log does not report time to serve a request. Do you think it is easy to get that information from rocket? Do you store the start and stop times for each request? I see start times stored in connections, but I'm not sure that's the right object. On Mar 30, 6:09 am, Timothy Farrelltfarr...@swgen.com wrote: I don't think upgrading will help much since Cherrypy was also slow. However, doing so would help cover all your bases. If you want to use the http log from Rocket you can do this. I'm assuming you invoke web2py.py from a bash script or just run it manually. Paste the following code into the top of web2py.py import logging import logging.handlers log = logging.getLogger('Rocket.Requests') log.setLevel(logging.INFO) log.addHandler(logging.handlers.FileHandler('rocket.log') I, like Yarko, do think this has more to do with something else. At one point web2py had a profiler built-in. That could be a good tool for finding slow spots. -tim On 3/29/2010 7:59 PM, MichaelToomimwrote: Yes, this is on linux! Do you recommend upgrading and trying again? mturk doesn't affect anything, I am just serving webpages that appear in iframes on the mturk website. From our perspective, I'm serving webpages. Do you have a method of logging how much time it takes to serve a page with rocket? Something that I can use instead of httpserver.log? It seems important for me to measure real-world performance, which ab does not do. My server has 768MB ram, and the only thing it does is run this web2py server. I assumed ram was not full, but did not check. I will check next time. On Mar 29, 12:10 pm, Timothy Farrelltfarr...@swgen.comwrote: snip/ -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py] Re: best jquery plugin ever
My PC @work has ie6..it's as awesome as it sounds. LOL! That made my day! Fortunately, I get to control my company so everyone gets a choice: IE8 or FF. I wish I could get them all on FF or Chrome, but people are creatures of habit. It's not worth the energy to push too hard. I haven't run into a situation yet that really kills me between IE7+ and the rest of the modern browser world. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py] Re: Here's a theory question
Yah that's basically what I said. =) On 3/30/2010 4:46 PM, Thadeus Burgess wrote: If you are with me so far, then Thadeus's question sounds like where do I put the client-code, to keep it MVC-like in organization, to help me keep my sanity during development and revision You hit the nail on the head. In the simplest form of the issue. To take an idea from gaming. There are two parts, the gaming client, and game server. The server handles all data storage/retrieval, it handles all logic (damage calculations, position movement, unit spawns, chat logs). The client takes data from the server (a list of all sprites) and renders them, and allows you an interface to send the server input. However the client has special logic to make sure your input matches only that which makes sense to the games logic. In this case, javascript is the game client, and web2py is the game server. Javascripts job is to take data, format it in a pretty way, and provide interfaces to allow for input that still adhears to the business logic. web2py handles the data storage/retrieval, and all logic (calculations, accounts, appointments, contact history). So here, what is returned as a web2py view is not really a view at all, but a client side application that happens to be in javascript. Now client side applications of any type (javascript, java swing, tkinter, pygame) follow their own MVC conventions. Where your model is the interface to communicate with the server, your view is the presentation and input handling layer, and your controller handles the transition from presentation to engineering layer. Now we get into the grit of the issue. If web2py can only return one view/.html file, how do I separate my javascript in such a way that makes sense, so that it can all be streamed in one request by web2py, but still communicate via ajax with web2py without refreshing the page completely. So you end up with your view files actually being the cilent application, and your server exposing services, where your controllers response is now the view -Thadeus On Tue, Mar 30, 2010 at 4:16 PM, Yarko Tymciurak resultsinsoftw...@gmail.com wrote: On Mar 30, 1:01 pm, Thadeus Burgessthade...@thadeusb.com wrote: How do you MVC a javascript client application? Here's the simple of it: An application is ... an application. Layered applications are partitioned into layers for (among other things) a clean interface between layers. This is important for a couple of reasons, one of them being the ability to move where the network boundary is. In typical, plain web2py applications, the network boundary is placed at the junction between the controller and the view (the controller being server-side). Now - more generally, layered applications are a way of structuring your solution. I like the 4 layer model, as it is descriptive and usually brings home another point: Presentation: How you display things to the end users; the problem is presented in a language describing the problem (and results) familiar to the end user, i.e. in the language of the problem domain.Typically, this is NOT in terms of classes or function calls (that is the language of the presentation), but rather (for example) in terms of account status, or amount due, or things registered for. Corresponds closely to V from MVC terminology. Business Rules: This is the solution, in the language of the problem-domain, i.e. in a way the end-user would be able to understand. Accounts are represented as accounts, names as names, etc. This is devoid of implementation logic (that is, there is nothing that says but you have to hold it this way for it to work in a python dict --- because a python dict has nothing to do with the end-user's problem domain). Engineering Rules: This is whatever logic you need to implement the Business rules, in the language needed to accomplish this in the technology in use. For example, account_in_good_standing() - lets say this will be business-rule-like - would list things like: account_exists(), account_positive_balance(), etc. The engineering rules would implement account_exists() logic as DAL validator statements (depends on table definitions - even if they are close to the business language), perhaps queries. Since another implementation might use sqalchemy rather than DAL, the Engineering rules (the way you would implement) would differ for that system, BUT NOT the Business Rules. Together, Business Rule and Engineering Rule layers correspond to C from MVC. Data Persistence Layer: This is where sqalchemy, DAL, data manipulation and storage code (and device and network layer drivers) would go. db.define_table() (and all it's contents) are here. Even as you might be accustomed to seeing requires - standard statements in something like db.py, by this definition, those would only be standard validators required to ensure data consistency -- validators that belong in the Engineering Rule
Re: [web2py] Re: webserver slow, misreported
I don't think upgrading will help much since Cherrypy was also slow. However, doing so would help cover all your bases. If you want to use the http log from Rocket you can do this. I'm assuming you invoke web2py.py from a bash script or just run it manually. Paste the following code into the top of web2py.py import logging import logging.handlers log = logging.getLogger('Rocket.Requests') log.setLevel(logging.INFO) log.addHandler(logging.handlers.FileHandler('rocket.log') I, like Yarko, do think this has more to do with something else. At one point web2py had a profiler built-in. That could be a good tool for finding slow spots. -tim On 3/29/2010 7:59 PM, Michael Toomim wrote: Yes, this is on linux! Do you recommend upgrading and trying again? mturk doesn't affect anything, I am just serving webpages that appear in iframes on the mturk website. From our perspective, I'm serving webpages. Do you have a method of logging how much time it takes to serve a page with rocket? Something that I can use instead of httpserver.log? It seems important for me to measure real-world performance, which ab does not do. My server has 768MB ram, and the only thing it does is run this web2py server. I assumed ram was not full, but did not check. I will check next time. On Mar 29, 12:10 pm, Timothy Farrelltfarr...@swgen.com wrote: snip/ -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py] Here's a theory question
This is my best understanding (using ExtJS as an case-study): Models -- Stores (Generally these communicate with the server side) Views -- Layouts + Widgets (these generate and respond to events) Controllers -- Events that control interactions between widgets and stores Ext has simplified Models with its Ext.direct stuff. How's that? -tim On 3/30/2010 1:01 PM, Thadeus Burgess wrote: How do you MVC a javascript client application? So I have web2py acting as the server, and I write a Javascript GUI (based off extjs or similar library). So of course this goes in the View files... The interesting question is that these client side js have their own MCV on top of that (models are your JSONRPC, controllers to format data/communicate with server, and then view code to generate/populate the html). -Thadeus -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py] Here's a theory question
I think you're trying to over-complicate things. web2py is built around the idea of the server-client (or request-response) relationship. While capable of Ajax, the default paradigm of web2py reloads pages on most requests. In this model (not to be confused with the Model portion of MVC), what is sent to the browser is all View. However, in the context of Rich Internet Applications, I don't think it makes much sense for web2py to try to match its Models with client-side Models in Javascript. To do so, web2py would need to be married to a specific Javascript toolkit (more-so than it already is). It's possible that web2py's DAL could have added functionality that exposes ExtJS's directStore functionality, but that's the only way I could see marrying both server-side and client-side MVC components. Am I misunderstanding you? On 3/30/2010 1:51 PM, Thadeus Burgess wrote: Aye, this I understand, but for every web2py view, you need a js (model, view, controller). The question is how should these be physically laid out while still keeping symbolism as they all are apart of the same web2py view? -Thadeus On Tue, Mar 30, 2010 at 1:45 PM, Timothy Farrelltfarr...@swgen.com wrote: This is my best understanding (using ExtJS as an case-study): Models -- Stores (Generally these communicate with the server side) Views -- Layouts + Widgets (these generate and respond to events) Controllers -- Events that control interactions between widgets and stores Ext has simplified Models with its Ext.direct stuff. How's that? -tim On 3/30/2010 1:01 PM, Thadeus Burgess wrote: How do you MVC a javascript client application? So I have web2py acting as the server, and I write a Javascript GUI (based off extjs or similar library). So of course this goes in the View files... The interesting question is that these client side js have their own MCV on top of that (models are your JSONRPC, controllers to format data/communicate with server, and then view code to generate/populate the html). -Thadeus -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py] Re: webserver slow, misreported
Perhaps a simpler set of questions: Did you have this working with Cherrypy beforehand? If so, is Rocket the only thing to have changed? The latest changes to Rocket were committed to the Mercurial web2py repo on March 18th. I'm assuming you've run a checkout since then. -tim On 3/28/2010 4:23 PM, mdipierro wrote: One more thing. You ask But a single process doing complex joins should not slow down all other simple selects and inserts, right? no, except for sqlite. sqlite serializes all requests because locks the db. That could explain the 0.20s if you have lots of queries per request, but not the 54s for the server. On Mar 28, 4:22 pm, mdipierromdipie...@cs.depaul.edu wrote: On Mar 28, 3:46 pm, Michael Toomimtoo...@gmail.com wrote: Any idea why there is a discrepancy between Firebug and httpserver.log? httpserver.log logs the time spend in web2py, not including the time for sending and receiving the http request/response. firebug logs the the total time, including time spend by the web server for communication. I am using postgresql. What would indicate model complexity? I have around 9 tables, but most of the requests just do single-object selects and inserts. No complex joins are in public-facing pages, but myself as an administrator periodically load a page that does big joins. But a single process doing complex joins should not slow down all other simple selects and inserts, right? In your case there are two problems (and I do not know what causes them): 1) web2py is taking 0.20seconds to process a response. That is more than 10 times what it should be. 2) the communication between the web server and the browser takes very very long time. Is the server on localhost? If not this could be a network issue. On Mar 27, 6:48 am, mdipierromdipie...@cs.depaul.edu wrote: Mind that if you use sqlite there is no concurrency. Still these numbers are very low. Are your models very complex? On 27 Mar, 00:06, Michael Toomimtoo...@gmail.com wrote: I'm using web2py+rocket to serve jobs on mechanical turk. The server probably gets a hit per second or so by workers on mechanical turk using it. When I have no users, everything is fast. But in active use, I notice that web pages often load reay slow in my web browser, but the httpserver.log file reports only small times. For instance, I just loaded a page that httpserver.log said took 0.20 seconds, but Firebug said took 54.21 seconds. That's a big difference. Any idea what's going on? I guess I'll have to try apache? -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py] Re: webserver slow, misreported
On 3/29/2010 1:39 PM, Michael Toomim wrote: I was having slowness problems with cherrypy too! That's why I switched to rocket. So perhaps it's something common to cherrypy and rocket, or perhaps they are both slow in their own ways? This is using web2py from march 16th, so it's not the latest rocket. Do you think something important changed for concurrency? I'm the author of Rocket. I _know_ something important changed on March 18th. =) But that important change only really affects the *nix platform. You haven't said what you're running on. I'm not familiar with MTurk very well. Is it directly connected to your web2py setup? Does it run on Windows/Linux? You said that you were having trouble with Cherrypy too. Is Rocket better or worse than Cherrypy? The one hang-up that I can see here is if you're server is memory-limited then multiple concurrent connections will cause thrashing due to swapping. This situation would be fast with one but slow with multiple connections. We need some more information before we can help you further. But if Cherrypy wasn't cutting it then perhaps you should look into some of the native code solutions such as Apache. This sounds like something wider than just the webserver. -tim On Mar 29, 5:56 am, Timothy Farrelltfarr...@swgen.com wrote: Perhaps a simpler set of questions: Did you have this working with Cherrypy beforehand? If so, is Rocket the only thing to have changed? The latest changes to Rocket were committed to the Mercurial web2py repo on March 18th. I'm assuming you've run a checkout since then. -tim On 3/28/2010 4:23 PM, mdipierro wrote: One more thing. You ask But a single process doing complex joins should not slow down all other simple selects and inserts, right? no, except for sqlite. sqlite serializes all requests because locks the db. That could explain the 0.20s if you have lots of queries per request, but not the 54s for the server. On Mar 28, 4:22 pm, mdipierromdipie...@cs.depaul.eduwrote: On Mar 28, 3:46 pm, Michael Toomimtoo...@gmail.comwrote: Any idea why there is a discrepancy between Firebug and httpserver.log? httpserver.log logs the time spend in web2py, not including the time for sending and receiving the http request/response. firebug logs the the total time, including time spend by the web server for communication. I am using postgresql. What would indicate model complexity? I have around 9 tables, but most of the requests just do single-object selects and inserts. No complex joins are in public-facing pages, but myself as an administrator periodically load a page that does big joins. But a single process doing complex joins should not slow down all other simple selects and inserts, right? In your case there are two problems (and I do not know what causes them): 1) web2py is taking 0.20seconds to process a response. That is more than 10 times what it should be. 2) the communication between the web server and the browser takes very very long time. Is the server on localhost? If not this could be a network issue. On Mar 27, 6:48 am, mdipierromdipie...@cs.depaul.eduwrote: Mind that if you use sqlite there is no concurrency. Still these numbers are very low. Are your models very complex? On 27 Mar, 00:06, Michael Toomimtoo...@gmail.comwrote: I'm using web2py+rocket to serve jobs on mechanical turk. The server probably gets a hit per second or so by workers on mechanical turk using it. When I have no users, everything is fast. But in active use, I notice that web pages often load reay slow in my web browser, but the httpserver.log file reports only small times. For instance, I just loaded a page that httpserver.log said took 0.20 seconds, but Firebug said took 54.21 seconds. That's a big difference. Any idea what's going on? I guess I'll have to try apache? -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py] Re: benchmarking: rocket vs pound with four rockets
Yes, I'll be here for the foreseeable future, but Yarko's philosophy is much better. I've designed Rocket with a liberal MIT license and clean-reading code so that it is easily maintainable. My best wishes going to anyone trying to maintain Cherrypy. I've studied its code and some aspects of it are still a mystery to me. Rocket comes with: - documentation - cleanly seperated modules - fewer general comments but fewer needed comments IMHO -tim On 3/20/2010 4:50 PM, Yarko Tymciurak wrote: On Mar 20, 12:36 pm, mdipierromdipie...@cs.depaul.edu wrote: Thanks this is clear. I should clarify my position on this. I always liked cherrypy because it is known to be fast and because many use it to it has been tested. The problem with cherrypy is that the code is not as clean as Rocket's. I also like Rocket because its code is very clean and readable and because the developer (you) is a member of this community. Some time ago I tried to rewrite Cherrypy in sneaky but I did not have time to bring it to production quality. Rocket reminds me of sneaky both as goals and as design and makes me feel I do not need work on sneaky any more and I can remove it from web2py. Speed is an important issue but not the only issue. Another important issue is long term support. Are you Tim committed to supporting Rocket long term? I would chime in with 2 obersvations / agreements: * Performance is NOT only about speed; -- remember when web2py.py used only cherrypy, and people had truncated files (web2py-distro.zip) - because cherrypy would get into situation of dropping connections? It varied with client, and I would expect (as HTML5 takes root, and browser engines update) this will rear its head again. Yeah, sure - I want to be able to have a web2py webstore or game serving thousands of connections... maybe... BUT I also want to be able to have a community website - church, social service agency, perhaps governemt - and I want to be sure that their streaming sermons, or huge podcast uploads, or those governemt drafts of huge bills up for a vote (How many pages did you say that was???) - that those WILL work... or live video feeds... or live development / collaborative / realtime interaction So there are number of connections, size of transfer (reliable large item transaction), and real-time response ability. And security... and... Well - for deployed solutions, we have compiled solutions. So maybe this is a mute point. But broader variety of testing is at point. I think - even as you decide to support one (and I am _all_ for from our community solutions!) - having a plugable architecture will HELP maintenance, i.e. make it _really_ easy to continue performance testing, and meaningful comparison tests: I am all for this! (but still choose to support one). As for long term support: 1] with plugable testing, this is less critical (accidents happen, people go away, and sooner or later you _have_ to make changes / adapt); [2] for volunteer work, all best intentions, all commitments change Summary: test different things; don't worry about decision (and make pluggable part of both the maintenance/testing and insurance part of this). - Yarko With the numbers I have seen I still lean towards rockets, but I would like to see more benchmakrs with pound (and/or haproxy). I would also like to hear more opinions from other users on this matter. Even if we default to one of the two, we could setup web2py to give users a choice (at least for a while). There may be problems with openssl vs ssl, but I think they can be resolved. Eventually I think we better make a choice and pack only one of the two. Massimo P.S. Binary web servers are not an option. On Mar 20, 11:58 am, Timothy Farrelltfarr...@swgen.com wrote: Summary: First, I'll speak in the context of a single instance of Rocket. I'll talk about pound in a bit. ApacheBench, which I used to test Rocket, unfairly accentuates the benefits of Rocket. httperf allows for a much fairer test. The httperf configuration that Kuba used tested a non-standard situation (while applicable to a project he's working on) that accentuates a known weakness of Rocket over Cherrypy. Even though the single-instance test was inconclusive the multi-instance test implied that Rocket would be slower in the single instance. Because my tests and Kuba's tests focused on polar opposite situations, the numbers were different. Nicholas Piel tested version 1.0.1 which did not include epoll support so his initial conclusions, while correct for the time, are no longer accurate. The difference in situations revolves around how many HTTP requests are pipelined over a single connection. ApacheBench puts them all in a few connections, httperf allows for configuring this. Kuba's benchmark settings put one request per connection. A real-world setting is something
Re: [web2py] Re: benchmarking: rocket vs pound with four rockets
*objection Gosh Massimo, you're wearing off on me. On 3/22/2010 9:49 AM, Timothy Farrell wrote: I have no object to gradual rollover. One way that could satisfy from all angles is to have HTTPS configurations default to use Rocket while regular connections use Cherrypy. This would accomplish: - revealing it to a smaller portion of the web2py user-ship at first - remove the requirement of compiling both pyOpenSSL and the ssl module On 3/22/2010 9:44 AM, mdipierro wrote: I have no objection to having an option and I would take a patch in this direction but: 1) I prefer to have rocket as default (else we will never know if there is some obscure problem with it) and, 2) they should both use ssl and not openssl so I do not have to redo the re- packaging. Right now we have one problem that needs to be fixed first. web2py.exe -h does not work for 1.76.5.3.b On Mar 22, 9:28 am, Jonathan Lundelljlund...@pobox.com wrote: On Mar 22, 2010, at 5:55 AM, Timothy Farrell wrote: web2py could support both but the benefits get lost quickly. web2py is designed to be simple, asking the user to pick which bundled web server they would like to use is too much in my opinion. No need to ask; there'd be a silent default. I'm thinking mainly of an overlapped transition. Short or Tall? Caf or Decaf? Sugar? Milk? (steamed?) Cinnamon? For here or To-go? How would you like your web2py today? On 3/20/2010 12:39 PM, Jonathan Lundell wrote: On Mar 20, 2010, at 9:58 AM, Timothy Farrell wrote: Vasile Ermicioi, put in a vote for Rocket to be included in web2py because I'm in the web2py community and there is still plenty of room for Rocket to be optimized (which I noted). I like the idea of built-in servers as plugins (not formally, but the general idea of supporting more than one in a simply configured way). The downside is that we won't have as focused testing of any one server, but it's compensated for by how much easier it would be to include a new server in the release without running the risk of breaking existing installations. As I've said, I don't think that ultimate performance need be a high priority for the built-in server; rather, ease of use and rock-solid stability are the priorities. And I think I like relying on the SSL package. My inclination: enable easy server switching. Keep CherryPy the default for at least one more release, but make Rocket and sneaky easy to ask for from at startup. That'll give those of us who are interested easy access to Rocket in a low-risk way. And then at some point, possibly very soon, switch the default to Rocket, retaining an easy option for the others as a fallback. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/web2py?hl=en. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py] Re: benchmarking: rocket vs pound with four rockets
I said, I have no object to gradual rollover. but meant to say I have no objection to gradual rollover. I mean that I'm misspelling words like you typically do. It was meant in jest. ;-P My mom was a stickler for proper pronunciation (being in Oklahoma you can see how that might be important). But I digress, rocket now has online documentation (though it is of little applicability to web2py). http://packages.python.org/rocket/ On 3/22/2010 10:37 AM, mdipierro wrote: Not sure what than means. Hope it is good. On Mar 22, 10:31 am, Timothy Farrelltfarr...@swgen.com wrote: *objection Gosh Massimo, you're wearing off on me. On 3/22/2010 9:49 AM, Timothy Farrell wrote: I have no object to gradual rollover. One way that could satisfy from all angles is to have HTTPS configurations default to use Rocket while regular connections use Cherrypy. This would accomplish: - revealing it to a smaller portion of the web2py user-ship at first - remove the requirement of compiling both pyOpenSSL and the ssl module On 3/22/2010 9:44 AM, mdipierro wrote: I have no objection to having an option and I would take a patch in this direction but: 1) I prefer to have rocket as default (else we will never know if there is some obscure problem with it) and, 2) they should both use ssl and not openssl so I do not have to redo the re- packaging. Right now we have one problem that needs to be fixed first. web2py.exe -h does not work for 1.76.5.3.b On Mar 22, 9:28 am, Jonathan Lundelljlund...@pobox.comwrote: On Mar 22, 2010, at 5:55 AM, Timothy Farrell wrote: web2py could support both but the benefits get lost quickly. web2py is designed to be simple, asking the user to pick which bundled web server they would like to use is too much in my opinion. No need to ask; there'd be a silent default. I'm thinking mainly of an overlapped transition. Short or Tall? Caf or Decaf? Sugar? Milk? (steamed?) Cinnamon? For here or To-go? How would you like your web2py today? On 3/20/2010 12:39 PM, Jonathan Lundell wrote: On Mar 20, 2010, at 9:58 AM, Timothy Farrell wrote: Vasile Ermicioi, put in a vote for Rocket to be included in web2py because I'm in the web2py community and there is still plenty of room for Rocket to be optimized (which I noted). I like the idea of built-in servers as plugins (not formally, but the general idea of supporting more than one in a simply configured way). The downside is that we won't have as focused testing of any one server, but it's compensated for by how much easier it would be to include a new server in the release without running the risk of breaking existing installations. As I've said, I don't think that ultimate performance need be a high priority for the built-in server; rather, ease of use and rock-solid stability are the priorities. And I think I like relying on the SSL package. My inclination: enable easy server switching. Keep CherryPy the default for at least one more release, but make Rocket and sneaky easy to ask for from at startup. That'll give those of us who are interested easy access to Rocket in a low-risk way. And then at some point, possibly very soon, switch the default to Rocket, retaining an easy option for the others as a fallback. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/web2py?hl=en. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
RE: [web2py] Re: benchmarking: rocket vs pound with four rockets
Summary: First, I'll speak in the context of a single instance of Rocket. I'll talk about pound in a bit. ApacheBench, which I used to test Rocket, unfairly accentuates the benefits of Rocket. httperf allows for a much fairer test. The httperf configuration that Kuba used tested a non-standard situation (while applicable to a project he's working on) that accentuates a known weakness of Rocket over Cherrypy. Even though the single-instance test was inconclusive the multi-instance test implied that Rocket would be slower in the single instance. Because my tests and Kuba's tests focused on polar opposite situations, the numbers were different. Nicholas Piel tested version 1.0.1 which did not include epoll support so his initial conclusions, while correct for the time, are no longer accurate. The difference in situations revolves around how many HTTP requests are pipelined over a single connection. ApacheBench puts them all in a few connections, httperf allows for configuring this. Kuba's benchmark settings put one request per connection. A real-world setting is something around 10, which Nicholas Piel uses. Kuba released another round of tests that follow Nicholas Piel's HTTP/1.1 tests (10 requests per connection). The results showed Rocket as performing slightly faster. Now, let's talk about pound. I've not used pound for any tests before so this was all new information to me. The first test showed 4 instances of Rocket behind pound to be slower than 4 instances of Cherrypy behind pound on a Quad-core machine. There are several possible explanations for this. All of the explanations require more development on Rocket to work around. The difference in performance would not be a show-stopper for me, but others may disagree. I've asked Kuba to retest 4xRocket vs. 4xCherrypy with the second test configuration. Vasile Ermicioi, put in a vote for Rocket to be included in web2py because I'm in the web2py community and there is still plenty of room for Rocket to be optimized (which I noted). Now you're up-to-date. -tim -Original Message- From: mdipierro mdipie...@cs.depaul.edu Sent: Friday, March 19, 2010 9:01pm To: web2py-users web2py@googlegroups.com Subject: [web2py] Re: benchmarking: rocket vs pound with four rockets had a long day, can somebody provide an execute summary of all the tests? On Mar 19, 3:33 pm, Timothy Farrell tfarr...@swgen.com wrote: Thank you Kuba. Would you mind re-running the 4x pound test like this also? On 3/19/2010 3:09 PM, Kuba Kucharski wrote: One instance of each, with 10 calls in a connection as it is closer to reallife scenario: (numbers speak for themselves) CHERRYPY: r...@kubatron:/home/kuba/httperf-0.9.0/src# ./httperf --hog --server 192.168.0.1 --port=8000 ==uri=/vae/default/benchmark2 --num-conns=1 --num-calls=10 httperf --hog --client=0/1 --server=192.168.0.1 --port=8000 --uri=/ --send-buffer=4096 --recv-buffer=16384 --num-conns=1 --num-calls=10 Maximum connect burst length: 1 Total: connections 1 requests 10 replies 10 test-duration 67.659 s Connection rate: 147.8 conn/s (6.8 ms/conn,=1 concurrent connections) Connection time [ms]: min 6.2 avg 6.8 max 10.5 median 6.5 stddev 0.2 Connection time [ms]: connect 0.1 Connection length [replies/conn]: 10.000 Request rate: 1478.0 req/s (0.7 ms/req) Request size [B]: 64.0 Reply rate [replies/s]: min 1474.7 avg 1478.0 max 1480.3 stddev 2.0 (13 samples) Reply time [ms]: response 0.6 transfer 0.0 Reply size [B]: header 205.0 content 66.0 footer 2.0 (total 273.0) Reply status: 1xx=0 2xx=0 3xx=10 4xx=0 5xx=0 CPU time [s]: user 25.67 system 41.99 (user 37.9% system 62.1% total 100.0%) Net I/O: 483.5 KB/s (4.0*10^6 bps) Errors: total 0 client-timo 0 socket-timo 0 connrefused 0 connreset 0 Errors: fd-unavail 0 addrunavail 0 ftab-full 0 other 0 ROCKET: r...@kubatron:/home/kuba/httperf-0.9.0/src# ./httperf --hog --server 192.168.0.1 --port=8000 ==uri=/vae/default/benchmark2 --num-conns=1 --num-calls=10 httperf --hog --client=0/1 --server=192.168.0.1 --port=8000 --uri=/ --send-buffer=4096 --recv-buffer=16384 --num-conns=1 --num-calls=10 Maximum connect burst length: 1 Total: connections 1 requests 10 replies 10 test-duration 64.760 s Connection rate: 154.4 conn/s (6.5 ms/conn,=1 concurrent connections) Connection time [ms]: min 5.9 avg 6.5 max 72.7 median 6.5 stddev 1.0 Connection time [ms]: connect 0.1 Connection length [replies/conn]: 10.000 Request rate: 1544.2 req/s (0.6 ms/req) Request size [B]: 64.0 Reply rate [replies/s]: min 1526.9 avg 1544.2 max 1555.9 stddev 8.6 (12 samples) Reply time [ms]: response 0.6 transfer 0.0 Reply size [B]: header 216.0 content 66.0 footer 0.0 (total 282.0) Reply status: 1xx=0 2xx=0 3xx=10 4xx=0 5xx=0 CPU time [s]: user 24.18 system 40.58 (user 37.3% system 62.7% total 100.0%) Net
Re: [web2py] Re: benchmarking: rocket vs pound with four rockets
This is a different test than the one I presented. The test I presented was run on Windows with one instance and tested with ApacheBench. I've looked at httperf a little and it seems to be a more realistic test than ApacheBench. Due to the nature of how Rocket handles listening sockets, it is a little slower at accepting connections compared to Cherrypy. Nicholas Piel's test handles 10 requests per connection whereas Apachebench would handle 1000. So there will be a difference by virtue of the difference in fresh connections. This could explain why Rocket is slower with 4 instances, but that being the case it should also be slower with one instance (even though they hit some arbitrary external wall) which is inconclusive at this point. I'd be curious which version Nicholas Piel tested. I just fixed a performance issue yesterday for linux. If he tested prior to that version (1.0.2) then yes, it would appear much slower. Are these numbers consistent with Tim numbers? Could this be dues to a different memory usage? Note that my tests were run on Windows. I'm not sure what Cherrypy's bottleneck on Windows is, but Rocket is not subject to it on that platform. Also, Rocket uses less memory (by almost 2MB) than Cherrypy on Windows 7. I haven't looked at memory usage in Linux but due to Rocket's less-custom code-base we should see a similarly smaller memory usage amount. In the 4-instance test, this is not a use-case I'd considered yet. As previously mentioned, Rocket is slower at accepting connections. If pound was closing the connection (HTTP 1.0 behavior and some HTTP 1.1 proxies) after every request, this could explain why Rocket comes up slower. Some other things to consider: - Kuba, how many processor cores are on your test machine? Having more processes than processors will hurt Rocket more than Cherrypy. - It seems that you are testing this against web2py (notice how all the responses are 3xx), perhaps you should just test the servers themselves for now. If that's not the case, may we see the invocation code? In the bigger picture, there are some other matters to consider: - Who will likely run web2py with the build-in webserver? New users testing things out or devs running relatively small jobs. - What platforms will those run on? Windows in the former. The latter is anyone's guess. (Let's not start a rabbit-trail about which operating system is better, just consider which one most students run.) So here are some things to consider in this situation: - Rocket measures (not horribly) slower than Cherrypy on Linux with 4 instances running. How common of a situation is this? - Rocket is not affected by a major concurrency issue with single-instance Cherrypy on Windows. I think going forward we should figure out which one is truly faster as a single-instance on Linux. I wouldn't be surprised if Rocket is slightly slower than Cherrypy but it should not be vastly slower. The goal of Rocket was not to be faster than Cherrypy but to be more concurrent. So far that's true for Windows and inconclusive on Linux. I don't have access to a Mac, but I would be surprised if Macs performed differently than Linux. Anyone know how to identify that wall that both servers are hitting on Linux? -tim On 3/19/2010 5:36 AM, Kuba Kucharski wrote: Are these numbers consistent with Tim numbers? Could this be dues to a different memory usage? 1. Tim? 2. I have a lot of free memory while testing I wrote email to an author of the blog entry about wsgi webserver benchmarks - Nicholas Piël http://nichol.as/benchmark-of-python-web-servers In short he says: make sure you do not use ab yes, in my tests I use httperf make sure you are running from other machine with limits also tweaked this is done like that by me use recompiled httperf done already this also comes from him: I did a quick benchmark after being pointed to Rocket and I could not see the same performance advantage for Rocket over CherryPy, more the opposite. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py] Re: benchmarking: rocket vs pound with four rockets
Just looking over the httperf command, Kuba used --num-calls=1 This would not be an accurate real-world test because it creates a new connection for every request whereas most browsers span requests over only a few connections. Nicholas Piel's test used --num-calls=10 for testing HTTP/1.1 servers. In my own test, the difference (on Windows) between 1 and 10 yields a ~2.5x increase in requests per second. I don't have a readily accessible Linux right now. Kuba, please run these numbers again with --num-calls=10. -tim On 3/19/2010 8:49 AM, Timothy Farrell wrote: This is a different test than the one I presented. The test I presented was run on Windows with one instance and tested with ApacheBench. I've looked at httperf a little and it seems to be a more realistic test than ApacheBench. Due to the nature of how Rocket handles listening sockets, it is a little slower at accepting connections compared to Cherrypy. Nicholas Piel's test handles 10 requests per connection whereas Apachebench would handle 1000. So there will be a difference by virtue of the difference in fresh connections. This could explain why Rocket is slower with 4 instances, but that being the case it should also be slower with one instance (even though they hit some arbitrary external wall) which is inconclusive at this point. I'd be curious which version Nicholas Piel tested. I just fixed a performance issue yesterday for linux. If he tested prior to that version (1.0.2) then yes, it would appear much slower. Are these numbers consistent with Tim numbers? Could this be dues to a different memory usage? Note that my tests were run on Windows. I'm not sure what Cherrypy's bottleneck on Windows is, but Rocket is not subject to it on that platform. Also, Rocket uses less memory (by almost 2MB) than Cherrypy on Windows 7. I haven't looked at memory usage in Linux but due to Rocket's less-custom code-base we should see a similarly smaller memory usage amount. In the 4-instance test, this is not a use-case I'd considered yet. As previously mentioned, Rocket is slower at accepting connections. If pound was closing the connection (HTTP 1.0 behavior and some HTTP 1.1 proxies) after every request, this could explain why Rocket comes up slower. Some other things to consider: - Kuba, how many processor cores are on your test machine? Having more processes than processors will hurt Rocket more than Cherrypy. - It seems that you are testing this against web2py (notice how all the responses are 3xx), perhaps you should just test the servers themselves for now. If that's not the case, may we see the invocation code? In the bigger picture, there are some other matters to consider: - Who will likely run web2py with the build-in webserver? New users testing things out or devs running relatively small jobs. - What platforms will those run on? Windows in the former. The latter is anyone's guess. (Let's not start a rabbit-trail about which operating system is better, just consider which one most students run.) So here are some things to consider in this situation: - Rocket measures (not horribly) slower than Cherrypy on Linux with 4 instances running. How common of a situation is this? - Rocket is not affected by a major concurrency issue with single-instance Cherrypy on Windows. I think going forward we should figure out which one is truly faster as a single-instance on Linux. I wouldn't be surprised if Rocket is slightly slower than Cherrypy but it should not be vastly slower. The goal of Rocket was not to be faster than Cherrypy but to be more concurrent. So far that's true for Windows and inconclusive on Linux. I don't have access to a Mac, but I would be surprised if Macs performed differently than Linux. Anyone know how to identify that wall that both servers are hitting on Linux? -tim On 3/19/2010 5:36 AM, Kuba Kucharski wrote: Are these numbers consistent with Tim numbers? Could this be dues to a different memory usage? 1. Tim? 2. I have a lot of free memory while testing I wrote email to an author of the blog entry about wsgi webserver benchmarks - Nicholas Piël http://nichol.as/benchmark-of-python-web-servers In short he says: make sure you do not use ab yes, in my tests I use httperf make sure you are running from other machine with limits also tweaked this is done like that by me use recompiled httperf done already this also comes from him: I did a quick benchmark after being pointed to Rocket and I could not see the same performance advantage for Rocket over CherryPy, more the opposite. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py] Re: web2py beautification
On 3/19/2010 9:27 AM, Thadeus Burgess wrote: CSS does not suck, your just doing it wrong! Isn't that supposed to be Javascript? CSS has never sucked, only IE's broken support for it. =) -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py] Re: benchmarking: rocket vs pound with four rockets
snip In my own test, the difference (on Windows) between 1 and 10 yields a ~2.5x increase in requests per second. I don't have a readily accessible Linux right now. Kuba, please run thesenumbers again with --num-calls=10. my reality is a lot of concurrent connections with only one call. I did num-calls=1 on purpose. I needed this test because of a thing I am building and this thing MUST work like this. Although I will try num-calls10 as soon as I have access to my testing environment again Perhaps it's important to state the context for which our benchmarks are conducted. In the bigger picture, there are some other matters to consider: - Who will likely run web2py with the build-in webserver? New users testing things out or devs running relatively small jobs. This might not be true. My thing is not for users surfing through some web application..downloading.. having sessions.., it is about some voice over ip servers talking to my servers via xml-rpc. So, I may need embedded server(like rocket or cherrypy) in production because it could simplify cluster environment My point here was about the general web2py population rather than your thing. No offense intended, but you have a special case. web2py handles web-services but that is not it's primary function. I think Massimo wishes to primarily direct web2py toward the traditional browsers requesting web content over persistent connections situation. (Massimo, as always, I'm open to correction.) thank you for your time, Tim, Rocket code looks really impressive I built Rocket because I saw some deficiencies in Cherrypy. I'm not expecting that web2py and Rocket will have totally compatible goals, but I do think that there is enough overlap for the projects to benefit from each other. Beyond that, Rocket is young and there are plenty of optimization and tuning options yet to be explored. -tim -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py] Re: benchmarking: rocket vs pound with four rockets
Thank you Kuba. Would you mind re-running the 4x pound test like this also? On 3/19/2010 3:09 PM, Kuba Kucharski wrote: One instance of each, with 10 calls in a connection as it is closer to reallife scenario: (numbers speak for themselves) CHERRYPY: r...@kubatron:/home/kuba/httperf-0.9.0/src# ./httperf --hog --server 192.168.0.1 --port=8000 ==uri=/vae/default/benchmark2 --num-conns=1 --num-calls=10 httperf --hog --client=0/1 --server=192.168.0.1 --port=8000 --uri=/ --send-buffer=4096 --recv-buffer=16384 --num-conns=1 --num-calls=10 Maximum connect burst length: 1 Total: connections 1 requests 10 replies 10 test-duration 67.659 s Connection rate: 147.8 conn/s (6.8 ms/conn,=1 concurrent connections) Connection time [ms]: min 6.2 avg 6.8 max 10.5 median 6.5 stddev 0.2 Connection time [ms]: connect 0.1 Connection length [replies/conn]: 10.000 Request rate: 1478.0 req/s (0.7 ms/req) Request size [B]: 64.0 Reply rate [replies/s]: min 1474.7 avg 1478.0 max 1480.3 stddev 2.0 (13 samples) Reply time [ms]: response 0.6 transfer 0.0 Reply size [B]: header 205.0 content 66.0 footer 2.0 (total 273.0) Reply status: 1xx=0 2xx=0 3xx=10 4xx=0 5xx=0 CPU time [s]: user 25.67 system 41.99 (user 37.9% system 62.1% total 100.0%) Net I/O: 483.5 KB/s (4.0*10^6 bps) Errors: total 0 client-timo 0 socket-timo 0 connrefused 0 connreset 0 Errors: fd-unavail 0 addrunavail 0 ftab-full 0 other 0 ROCKET: r...@kubatron:/home/kuba/httperf-0.9.0/src# ./httperf --hog --server 192.168.0.1 --port=8000 ==uri=/vae/default/benchmark2 --num-conns=1 --num-calls=10 httperf --hog --client=0/1 --server=192.168.0.1 --port=8000 --uri=/ --send-buffer=4096 --recv-buffer=16384 --num-conns=1 --num-calls=10 Maximum connect burst length: 1 Total: connections 1 requests 10 replies 10 test-duration 64.760 s Connection rate: 154.4 conn/s (6.5 ms/conn,=1 concurrent connections) Connection time [ms]: min 5.9 avg 6.5 max 72.7 median 6.5 stddev 1.0 Connection time [ms]: connect 0.1 Connection length [replies/conn]: 10.000 Request rate: 1544.2 req/s (0.6 ms/req) Request size [B]: 64.0 Reply rate [replies/s]: min 1526.9 avg 1544.2 max 1555.9 stddev 8.6 (12 samples) Reply time [ms]: response 0.6 transfer 0.0 Reply size [B]: header 216.0 content 66.0 footer 0.0 (total 282.0) Reply status: 1xx=0 2xx=0 3xx=10 4xx=0 5xx=0 CPU time [s]: user 24.18 system 40.58 (user 37.3% system 62.7% total 100.0%) Net I/O: 521.8 KB/s (4.3*10^6 bps) Errors: total 0 client-timo 0 socket-timo 0 connrefused 0 connreset 0 Errors: fd-unavail 0 addrunavail 0 ftab-full 0 other 0 -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py] benchmarking: rocket vs pound with four rockets
Kuba, Thanks for taking the time to test this. I've found a bug in the Linux version that hinders performance. I think you'll see things improve a great deal with this next minor version. Thanks, -tim On 3/17/2010 8:20 PM, Kuba Kucharski wrote: This is probably obvious but I decided to try this myself: Should one run web2py with Pound on multi-core server? probably yes if you deal with concurrent connections.. This is my config: 2.6.31-19-generic-pae Intel(R) Xeon(R) CPU E5410 @ 2.33GHz Ubuntu 64bit one processor with 4 cores disk is serial ata, with performance around this: #/sbin/hdparm -t /dev/sda /dev/sda: Timing buffered disk reads: 268 MB in 3.01 seconds = 88.96 MB/sec This is slow. This is one SATA disk. I used mysql-5.1 for writing tests. I run it on the same machine. Also POUND. ab command runs on my 32bit ubuntu laptop with 2.5 Ghz Core2Duo. Server and laptop are connected via Gigabit ethernet directly. I did 12 concurrent connections with 2000 calls, and then 1 connection with 2000 calls test for every case. Application was compiled. I set migrate=False. READING: ROCKET : r...@kubatron:/home/kuba/httperf-0.9.0/src# ab -n 2000 -c 12 http://192.168.0.1:8000/vae/default/benchmark2 Concurrency Level: 12 Time taken for tests: 15.441 seconds Complete requests: 2000 Failed requests:0 Write errors: 0 Total transferred: 852000 bytes HTML transferred: 236000 bytes Requests per second:129.52 [#/sec] (mean) Time per request: 92.647 [ms] (mean) Time per request: 7.721 [ms] (mean, across all concurrent requests) Transfer rate: 53.88 [Kbytes/sec] received #for concurrency level: 1 #Requests per second:157.27 [#/sec] (mean) #Time per request: 6.359 [ms] (mean) #Time per request: 6.359 [ms] (mean, across all concurrent requests) #Transfer rate: 65.43 [Kbytes/sec] received POUND + 4 x ROCKET : r...@kubatron:/home/kuba/httperf-0.9.0/src# ab -n 2000 -c 12 http://192.168.0.1:8080/vae/default/benchmark2 Concurrency Level: 12 Time taken for tests: 6.828 seconds Complete requests: 2000 Failed requests:0 Write errors: 0 Total transferred: 852000 bytes HTML transferred: 236000 bytes Requests per second:292.91 [#/sec] (mean) Time per request: 40.968 [ms] (mean) Time per request: 3.414 [ms] (mean, across all concurrent requests) Transfer rate: 121.86 [Kbytes/sec] received This is faster!! More than twice! #for concurrency level: 1 #Requests per second:129.28 [#/sec] (mean) #Time per request: 7.735 [ms] (mean) #Time per request: 7.735 [ms] (mean, across all concurrent requests) #Transfer rate: 53.78 [Kbytes/sec] received WRITING(mysql innodb)- to see writing bottleneck = ROCKET : r...@kubatron:/home/kuba/httperf-0.9.0/src# ab -n 2000 -c 12 http://192.168.0.1:8000/vae/default/benchmark Concurrency Level: 12 Time taken for tests: 23.466 seconds Complete requests: 2000 Failed requests:0 Write errors: 0 Total transferred: 858429 bytes HTML transferred: 242121 bytes Requests per second:85.23 [#/sec] (mean) Time per request: 140.798 [ms] (mean) Time per request: 11.733 [ms] (mean, across all concurrent requests) Transfer rate: 35.72 [Kbytes/sec] received #for concurrency level: 1 #Requests per second:15.69 [#/sec] (mean) #Time per request: 63.735 [ms] (mean) #Time per request: 63.735 [ms] (mean, across all concurrent requests) #Transfer rate: 6.57 [Kbytes/sec] received POUND + 4 x ROCKET : r...@kubatron:/home/kuba/httperf-0.9.0/src# ab -n 2000 -c 12 http://192.168.0.1:8080/vae/default/benchmark Concurrency Level: 12 Time taken for tests: 17.797 seconds Complete requests: 2000 Failed requests:0 Write errors: 0 Total transferred: 858308 bytes HTML transferred: 242000 bytes Requests per second:112.38 [#/sec] (mean) Time per request: 106.783 [ms] (mean) Time per request: 8.899 [ms] (mean, across all concurrent requests) Transfer rate: 47.10 [Kbytes/sec] received This is faster too. #for concurrency level: 1 #Requests per second:15.27 [#/sec] (mean) #Time per request: 65.468 [ms] (mean) #Time per request: 65.468 [ms] (mean, across all concurrent requests) #Transfer rate: 6.40 [Kbytes/sec] received model is: - #yes I need Service in my other controllers(xml-rpc) from gluon.tools import Service db = DAL('mysql://root:passw...@localhost/vae2') session.forget() service=Service(globals())
Re: [web2py] Re: benchmarking: rocket vs pound with four rockets
1.0.2 is out. Go get it! On 3/18/2010 11:57 AM, mdipierro wrote: from https://launchpad.net/rocket the second gree button on the right is Rocket-mono-xxx.zip Unzip it. You get rocket.py. Move it into web2py/gluon/ web2py trunk already uses 1.0.1 so we have wait for Tim to post the new one. Massimo On Mar 18, 10:51 am, Kuba Kucharskikuba.kuchar...@gmail.com wrote: @Tim do you have the fix already in launchpad? if yes can you tell me how to replace rocket with the newest one inside web2py? -- Kuba -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
RE: [web2py] Re: no more cherrypy wsgiserver
ab -n 1 -c 1000 -k http://localhost/ If your website is slow, Rocket will only speed it up if you have lots concurrent connections. -tim -Original Message- From: Michael Toomim too...@gmail.com Sent: Tuesday, March 16, 2010 5:32pm To: web2py-users web2py@googlegroups.com Subject: [web2py] Re: no more cherrypy wsgiserver Did you do anything special to use apachebench on the cherrypy server? When I run ab http://localhost/init/; I get a apr_socket_recv: Connection refused (111) error from apachebench. If I do the same command when running the latest hg tip of web2py (with rocket), the benchmark works. I'm trying to see if rocket will speed up my website. On Mar 12, 9:13 am, Timothy Farrell tfarr...@swgen.com wrote: The benchmarks are in. As you can see from the attached PDF, there is a strong case for Rocket. How I conducted these benchmarks: CPU: Athlon 4050e 2.1 GHz RAM: 3GB OS: Windows 7 Ultimate Python 2.6.1 Rocket 0.3.1 Cherrypy 3.1.2 I used ApacheBench to run the numbers you see. The wsgi app used was as basic as it gets: def test_app(env, start_response): start_response('200 OK', [('Content-Type', 'text/plain')]) return [True] Apache (and mod_wsgi) were not particularly tuned but were included to show generally where it would end up on scales. Don't take this as a definitive look at Apache or mod_wsgi's performance (back you nginx/cherokee/lighty trolls! ;-). This is about a server that can be included in web2py. You'll notice some blank entries in the numbers...here's why: My original intervals were 1,2,5,10,25,50,100,250,500,1000. However, I added in 6,7,8 after seeing Cherrypy's performance hit a wall. I wanted to show where that happened. I didn't see it necessary to include Rocket or mod_wsgi in those iterations since they saw no such wall. mod_wsgi does not include numbers for 500 or 1000 concurrent connections because at that point Apache started rejecting connections. This would not be an issue on a properly configured Apache. Once again, the main comparison here is between Rocket and Cherrypy's wsgiserver. If you would like the full spreadsheet, email me privately. -tim On 3/11/2010 10:19 AM, Timothy Farrell wrote: The code has changed since version 0.1, Let me re-run some benchmarks. I'll have time to tomorrow. For those curious, the basic difference is that Rocket handles a few concurrent connections as fast as wsgiserver and many concurrent connections much much faster. It's also smaller, with cleaner code. -tim On 3/11/2010 10:08 AM, mdipierro wrote: We moved from cherrypy wsgiserver to Rocket, by Timothy Farrell. I included an older version, need to include the latest one. It needs to be tested but let's wait I post the latest version before we do so. Why? @Tim, you made a very convincing case to me some time ago. Can you share your benchmark with the rest of the users? Massimo Rocket Benchmarks.pdf 10KViewDownload -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py] Rocket - windows binary issues
This would be a good way to include more coverage within web2py since it will span more versions. Probably the only noticeable difference would be some deprecation warnings. Perhaps you could turn off deprecation warnings in the build? -tim On 3/15/2010 11:20 AM, mdipierro wrote: Due to my lack of familiarity with Windows and my refusal to spend time on it I am running into a problem. I cannot build the web2py binary including ssl 1.15 in order to use rocket. A simple solution would be to make the window binary with Python 2.6 instead of Python 2.5. Any objection? Massimo -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py] Re: Prevent caching of certain files
When all you have is a hammer, everything looks like a nail. --/Maslow's hammer/ On 3/15/2010 11:42 AM, Thadeus Burgess wrote: Ahah! One step closer to app level routes! -Thadeus On Mon, Mar 15, 2010 at 11:15 AM, mdipierromdipie...@cs.depaul.edu wrote: You raise a good point. There is no way to do it because I assume on a production system this should be done by the web server. Perhaps we should have something like routes.static.py in the static folder with cache configuration options for the files in there. On Mar 15, 11:00 am, mr.freezenat...@freezable.com wrote: Yes, static files. I am basically asking how to set the cache control headers for static files. Models don't get processed so I'm not sure where to do it without hacking main.py. Am I thinking about this wrong? On Mar 15, 10:37 am, mdipierromdipie...@cs.depaul.edu wrote: Static files? In the end it is the browser that caches them. web2py does not ask the browser to cache them. You can try serve them using a custom controller. In this case web2py would do (under the hood): response.headers['Content-Type'] = contenttype('.'+request.extension) response.headers['Cache-Control'] = \ 'no-store, no-cache, must-revalidate, post-check=0, pre-check=0' response.headers['Expires'] = \ time.strftime('%a, %d %b %Y %H:%M:%S GMT', time.gmtime()) response.headers['Pragma'] = 'no-cache' The browser may still ignore it. On Mar 15, 10:23 am, mr.freezenat...@freezable.com wrote: What is the best way to prevent caching of all files in a subfolder of static from being cached. The files are served by web2py. Any help is appreciated. Thanks, Nathan -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py] Re: Rocket - windows binary issues
That's a good point. I can only think of two possible implications: - Possible deprecated messages on the console (would not show up in production though) - It will allow 2.6 syntax whereas production would not (so you would have to be careful) Neither of these would be blockers for me if I were in your situation, but you are, of course, free to make your own conclusion. -tim On 3/15/2010 12:45 PM, reyelts wrote: How would this impact those of us who develop with the current Windows binary image and then test/deploy with GAE which requires Python 2.5? I hate developing directly with dev_appserver.py because it runs so much slower. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py] no more cherrypy wsgiserver
The benchmarks are in. As you can see from the attached PDF, there is a strong case for Rocket. How I conducted these benchmarks: CPU: Athlon 4050e 2.1 GHz RAM: 3GB OS: Windows 7 Ultimate Python 2.6.1 Rocket 0.3.1 Cherrypy 3.1.2 I used ApacheBench to run the numbers you see. The wsgi app used was as basic as it gets: def test_app(env, start_response): start_response('200 OK', [('Content-Type', 'text/plain')]) return [True] Apache (and mod_wsgi) were not particularly tuned but were included to show generally where it would end up on scales. Don't take this as a definitive look at Apache or mod_wsgi's performance (back you nginx/cherokee/lighty trolls! ;-). This is about a server that can be included in web2py. You'll notice some blank entries in the numbers...here's why: My original intervals were 1,2,5,10,25,50,100,250,500,1000. However, I added in 6,7,8 after seeing Cherrypy's performance hit a wall. I wanted to show where that happened. I didn't see it necessary to include Rocket or mod_wsgi in those iterations since they saw no such wall. mod_wsgi does not include numbers for 500 or 1000 concurrent connections because at that point Apache started rejecting connections. This would not be an issue on a properly configured Apache. Once again, the main comparison here is between Rocket and Cherrypy's wsgiserver. If you would like the full spreadsheet, email me privately. -tim On 3/11/2010 10:19 AM, Timothy Farrell wrote: The code has changed since version 0.1, Let me re-run some benchmarks. I'll have time to tomorrow. For those curious, the basic difference is that Rocket handles a few concurrent connections as fast as wsgiserver and many concurrent connections much much faster. It's also smaller, with cleaner code. -tim On 3/11/2010 10:08 AM, mdipierro wrote: We moved from cherrypy wsgiserver to Rocket, by Timothy Farrell. I included an older version, need to include the latest one. It needs to be tested but let's wait I post the latest version before we do so. Why? @Tim, you made a very convincing case to me some time ago. Can you share your benchmark with the rest of the users? Massimo -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en. Rocket Benchmarks.pdf Description: Adobe PDF document
Re: [web2py] no more cherrypy wsgiserver
Python 2.6.4, not 2.6.1 oops. On 3/12/2010 10:13 AM, Timothy Farrell wrote: The benchmarks are in. As you can see from the attached PDF, there is a strong case for Rocket. How I conducted these benchmarks: CPU: Athlon 4050e 2.1 GHz RAM: 3GB OS: Windows 7 Ultimate Python 2.6.1 Rocket 0.3.1 Cherrypy 3.1.2 I used ApacheBench to run the numbers you see. The wsgi app used was as basic as it gets: def test_app(env, start_response): start_response('200 OK', [('Content-Type', 'text/plain')]) return [True] Apache (and mod_wsgi) were not particularly tuned but were included to show generally where it would end up on scales. Don't take this as a definitive look at Apache or mod_wsgi's performance (back you nginx/cherokee/lighty trolls! ;-). This is about a server that can be included in web2py. You'll notice some blank entries in the numbers...here's why: My original intervals were 1,2,5,10,25,50,100,250,500,1000. However, I added in 6,7,8 after seeing Cherrypy's performance hit a wall. I wanted to show where that happened. I didn't see it necessary to include Rocket or mod_wsgi in those iterations since they saw no such wall. mod_wsgi does not include numbers for 500 or 1000 concurrent connections because at that point Apache started rejecting connections. This would not be an issue on a properly configured Apache. Once again, the main comparison here is between Rocket and Cherrypy's wsgiserver. If you would like the full spreadsheet, email me privately. -tim On 3/11/2010 10:19 AM, Timothy Farrell wrote: The code has changed since version 0.1, Let me re-run some benchmarks. I'll have time to tomorrow. For those curious, the basic difference is that Rocket handles a few concurrent connections as fast as wsgiserver and many concurrent connections much much faster. It's also smaller, with cleaner code. -tim On 3/11/2010 10:08 AM, mdipierro wrote: We moved from cherrypy wsgiserver to Rocket, by Timothy Farrell. I included an older version, need to include the latest one. It needs to be tested but let's wait I post the latest version before we do so. Why? @Tim, you made a very convincing case to me some time ago. Can you share your benchmark with the rest of the users? Massimo -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py] Re: no more cherrypy wsgiserver
I'm not sure how you upgraded, but make sure you have a rocket.py in your gluon folder. -tim On 3/12/2010 3:42 PM, Jose wrote: On 11 mar, 16:08, mdipierromdipie...@cs.depaul.edu wrote: We moved from cherrypy wsgiserver to Rocket, by Timothy Farrell. I included an older version, need to include the latest one. It needs to be tested but let's wait I post the latest version before we do so. Why? @Tim, you made a very convincing case to me some time ago. Can you share your benchmark with the rest of the users? Massimo after upgrading yesterday web2py, I notice that apache stops (WebFaction). This is a portion of error_log: [Fri Mar 12 14:56:08 2010] [error] WARNING:root:unable to import Rocket [Fri Mar 12 15:00:47 2010] [notice] caught SIGTERM, shutting down [Fri Mar 12 15:02:55 2010] [notice] Apache/2.2.12 (Unix) mod_wsgi/2.5 Python/2.5.4 configured -- resuming normal operations [Fri Mar 12 15:03:06 2010] [error] server reached MaxClients setting, consider raising the MaxClients setting [Fri Mar 12 15:03:07 2010] [error] WARNING:root:unable to import Rocket [Fri Mar 12 15:03:08 2010] [error] WARNING:root:unable to import Rocket [Fri Mar 12 15:03:08 2010] [error] WARNING:root:unable to import Rocket [Fri Mar 12 15:03:08 2010] [error] WARNING:root:unable to import Rocket [Fri Mar 12 15:03:08 2010] [error] WARNING:root:unable to import Rocket [Fri Mar 12 15:07:02 2010] [alert] (11)Resource temporarily unavailable: mod_wsgi (pid=28970): Couldn't create reaper thread in daemon process 'web2py'. [Fri Mar 12 15:07:02 2010] [alert] (11)Resource temporarily unavailable: mod_wsgi (pid=29006): Couldn't create reaper thread in daemon process 'web2py'. [Fri Mar 12 15:07:02 2010] [alert] (11)Resource temporarily unavailable: mod_wsgi (pid=28934): Couldn't create reaper thread in daemon process 'web2py'. [Fri Mar 12 15:07:05 2010] [notice] caught SIGTERM, shutting down [Fri Mar 12 15:07:06 2010] [notice] Apache/2.2.12 (Unix) mod_wsgi/2.5 Python/2.5.4 configured -- resuming normal operations [Fri Mar 12 15:07:07 2010] [error] server reached MaxClients setting, consider raising the MaxClients setting [Fri Mar 12 15:07:52 2010] [error] WARNING:root:unable to import Rocket [Fri Mar 12 15:08:01 2010] [error] WARNING:root:unable to import Rocket [Fri Mar 12 15:19:49 2010] [error] WARNING:root:unable to import Rocket [Fri Mar 12 15:24:23 2010] [error] WARNING:root:unable to import Rocket [Fri Mar 12 15:25:22 2010] [error] WARNING:root:unable to import Rocket [Fri Mar 12 15:25:25 2010] [error] WARNING:root:unable to import Rocket Jose -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py] Re: no more cherrypy wsgiserver
OK, in testing mod_proxy I've hit a snag. I'd like for someone else to take a look. I have web2py running on port 8000. Here's the relevant section of my httpd.conf (this is Apache 2.2.14): IfModule proxy_module SetEnv force-proxy-request-1.0 1 SetEnv proxy-nokeepalive 1 ProxyBadHeader StartBody ProxyPass / http://localhost:8000/ ProxyPassReverse / http://localhost:8000/ ProxyPassReverseCookieDomain / http://localhost:8000/ ProxyPassReverseCookiePath / http://localhost:8000/ /IfModule Most pages work fine. Uploading and downloading large files works fine. In the admin app, when editing a file with EditArea, the keepalive request gets sent but it always errors resulting in a communication error in the Last Saved On box. Firebug shows the connection as Aborted. The request never gets through Apache on to Rocket (web2py). This same request works without Apache in the middle. Can anyone shed some light on this? I don't think this is rocket related but I need to be sure. -tim On 3/11/2010 4:07 PM, mdipierro wrote: mod_proxy yes. The other servers options do not use it. They do not use wsgiserver now. On Mar 11, 4:02 pm, Jonathan Lundelljlund...@pobox.com wrote: On Mar 11, 2010, at 9:50 AM, mdipierro wrote: He explained it partially here: https://launchpad.net/rocket/+announcements We will stress-test it with different browsers anyway. Not just browsers, right, but backending other servers and server variations? (mod_wsgi, mod_proxy, nginx, etc) -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py] no more cherrypy wsgiserver
The code has changed since version 0.1, Let me re-run some benchmarks. I'll have time to tomorrow. For those curious, the basic difference is that Rocket handles a few concurrent connections as fast as wsgiserver and many concurrent connections much much faster. It's also smaller, with cleaner code. -tim On 3/11/2010 10:08 AM, mdipierro wrote: We moved from cherrypy wsgiserver to Rocket, by Timothy Farrell. I included an older version, need to include the latest one. It needs to be tested but let's wait I post the latest version before we do so. Why? @Tim, you made a very convincing case to me some time ago. Can you share your benchmark with the rest of the users? Massimo -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py] no more cherrypy wsgiserver
One at a time: Is Rocket a port of CherryPy? Or is made from zero? No, it's my own code from the ground up. I did consult wsgiserver code in some areas, but I think that anyone who would examine the code would be satisfied to say it is not a derivative work. isn't 0.2 an earlier release yet? Don't get caught up on version numbers. Version 0.2 has every major feature that wsgiserver has. Also 0.3.1 is out and 0.4 is on the way. What's the principal difference from CherryPy? cleaner code, smaller.. and more? Connection concurrency. I built Rocket to be able to handle hundreds to thousands of connections well without hitting a performance wall (like wsgiserver does). Stay tuned for benchmarks. The minors are: - cleaner, smaller code - can support listening on multiple ports (though web2py may hide this functionality) - uses the standard ssl module instead of pyOpenSSL which has less of a future considering ssl is now in the standard library -tim On 3/11/2010 10:36 AM, Albert Abril wrote: Is Rocket a port of CherryPy? Or is made from zero? isn't 0.2 an earlier release yet? What's the principal difference from CherryPy? cleaner code, smaller.. and more? I'm questioning just for info of us the users, doesn't know so much about it. Thanks for all. Regatds!! On Thu, Mar 11, 2010 at 5:19 PM, Timothy Farrell tfarr...@swgen.com mailto:tfarr...@swgen.com wrote: The code has changed since version 0.1, Let me re-run some benchmarks. I'll have time to tomorrow. For those curious, the basic difference is that Rocket handles a few concurrent connections as fast as wsgiserver and many concurrent connections much much faster. It's also smaller, with cleaner code. -tim On 3/11/2010 10:08 AM, mdipierro wrote: We moved from cherrypy wsgiserver to Rocket, by Timothy Farrell. I included an older version, need to include the latest one. It needs to be tested but let's wait I post the latest version before we do so. Why? @Tim, you made a very convincing case to me some time ago. Can you share your benchmark with the rest of the users? Massimo -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web2py@googlegroups.com mailto:web2py@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com mailto:web2py%2bunsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py] no more cherrypy wsgiserver
snip For a production system, I'm more interested in stability than performance. And despite the admitted arbitrariness of version-numbering choices, it's hard to make the case to management that moving to an 0.x server is safe. What do *you* mean by labeling Rocket 0.x? That's a fair question. When I started, I had a certain set of features and goals that I planned to reach. Upon finishing all of those features and goal, there would be a 1.0 release. Since starting at least three of these goals have fallen by the wayside due to their improbability or lack of flexibility withing Python or the WSGI specification. In the end, I'll probably skip a few 0.x releases and go straight to 1.0 whenever I feel that there are enough of the features I originally set out to include. Like web2py, I strive to make every announced/released version stable enough to include in a project. I've been running web2py on different versions of Rocket for several months now. -tim -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py] Re: no more cherrypy wsgiserver
Slight correction: db.define_table('image',Field('upload', 'upload')) I have successfully up- and downloaded files as large as 480MB and apps as large as 160MB (any larger apps crashed on unzipping). In all cases I was testing over HTTPS. -tim On 3/11/2010 1:04 PM, mdipierro wrote: Rocket 0.3.1 is IN. Please download from trunk and start testing. Use this code db.define_table('image',Field('upload')) Please test upload and download of a large files via appadmin into image table. Please let us know which browser you tested and whether it worked or you experience any problem. Massimo On Mar 11, 12:24 pm, Timothy Farrelltfarr...@swgen.com wrote: snip For a production system, I'm more interested in stability than performance. And despite the admitted arbitrariness of version-numbering choices, it's hard to make the case to management that moving to an 0.x server is safe. What do *you* mean by labeling Rocket 0.x? That's a fair question. When I started, I had a certain set of features and goals that I planned to reach. Upon finishing all of those features and goal, there would be a 1.0 release. Since starting at least three of these goals have fallen by the wayside due to their improbability or lack of flexibility withing Python or the WSGI specification. In the end, I'll probably skip a few 0.x releases and go straight to 1.0 whenever I feel that there are enough of the features I originally set out to include. Like web2py, I strive to make every announced/released version stable enough to include in a project. I've been running web2py on different versions of Rocket for several months now. -tim -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py] Re: no more cherrypy wsgiserver
I tried larger files (2GB - 4.5GB) but Firefox wouldn't let me submit the form. Something about DVD images I suppose ;-) On 3/11/2010 2:18 PM, Timothy Farrell wrote: Slight correction: db.define_table('image',Field('upload', 'upload')) I have successfully up- and downloaded files as large as 480MB and apps as large as 160MB (any larger apps crashed on unzipping). In all cases I was testing over HTTPS. -tim On 3/11/2010 1:04 PM, mdipierro wrote: Rocket 0.3.1 is IN. Please download from trunk and start testing. Use this code db.define_table('image',Field('upload')) Please test upload and download of a large files via appadmin into image table. Please let us know which browser you tested and whether it worked or you experience any problem. Massimo On Mar 11, 12:24 pm, Timothy Farrelltfarr...@swgen.com wrote: snip For a production system, I'm more interested in stability than performance. And despite the admitted arbitrariness of version-numbering choices, it's hard to make the case to management that moving to an 0.x server is safe. What do *you* mean by labeling Rocket 0.x? That's a fair question. When I started, I had a certain set of features and goals that I planned to reach. Upon finishing all of those features and goal, there would be a 1.0 release. Since starting at least three of these goals have fallen by the wayside due to their improbability or lack of flexibility withing Python or the WSGI specification. In the end, I'll probably skip a few 0.x releases and go straight to 1.0 whenever I feel that there are enough of the features I originally set out to include. Like web2py, I strive to make every announced/released version stable enough to include in a project. I've been running web2py on different versions of Rocket for several months now. -tim -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py] Re: no more cherrypy wsgiserver
That was FF 3.6 on Win7. I'm going to try some less well behaved browsers (IE 5.5+ via IEtester) next. On 3/11/2010 2:21 PM, mdipierro wrote: Which browsers? The problem with cherrypy 3.x was for example that different browser treated in different ways the server delay and some browser truncated files on download. I want to make sure that all common browsers are tested. Massimo On Mar 11, 2:18 pm, Timothy Farrelltfarr...@swgen.com wrote: Slight correction: db.define_table('image',Field('upload', 'upload')) I have successfully up- and downloaded files as large as 480MB and apps as large as 160MB (any larger apps crashed on unzipping). In all cases I was testing over HTTPS. -tim On 3/11/2010 1:04 PM, mdipierro wrote: Rocket 0.3.1 is IN. Please download from trunk and start testing. Use this code db.define_table('image',Field('upload')) Please test upload and download of a large files via appadmin into image table. Please let us know which browser you tested and whether it worked or you experience any problem. Massimo On Mar 11, 12:24 pm, Timothy Farrelltfarr...@swgen.comwrote: snip For a production system, I'm more interested in stability than performance. And despite the admitted arbitrariness of version-numbering choices, it's hard to make the case to management that moving to an 0.x server is safe. What do *you* mean by labeling Rocket 0.x? That's a fair question. When I started, I had a certain set of features and goals that I planned to reach. Upon finishing all of those features and goal, there would be a 1.0 release. Since starting at least three of these goals have fallen by the wayside due to their improbability or lack of flexibility withing Python or the WSGI specification. In the end, I'll probably skip a few 0.x releases and go straight to 1.0 whenever I feel that there are enough of the features I originally set out to include. Like web2py, I strive to make every announced/released version stable enough to include in a project. I've been running web2py on different versions of Rocket for several months now. -tim -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py] Re: no more cherrypy wsgiserver
So I was testing with IE 5.5+. and I hit a bug uploading...but the bug is in IE. It kept failing on uploading very large files and I couldn't figure it out. Turns out, IE was sending this http header: Content-Length: -556031510 Oops. This is in IE 5.5 all the way to IE 8. I suspect that anything over 2 GB is overflowing the signed int. Anyway I'm calling the IE family good for anything under 2GB. -tim On 3/11/2010 2:25 PM, Timothy Farrell wrote: That was FF 3.6 on Win7. I'm going to try some less well behaved browsers (IE 5.5+ via IEtester) next. On 3/11/2010 2:21 PM, mdipierro wrote: Which browsers? The problem with cherrypy 3.x was for example that different browser treated in different ways the server delay and some browser truncated files on download. I want to make sure that all common browsers are tested. Massimo On Mar 11, 2:18 pm, Timothy Farrelltfarr...@swgen.com wrote: Slight correction: db.define_table('image',Field('upload', 'upload')) I have successfully up- and downloaded files as large as 480MB and apps as large as 160MB (any larger apps crashed on unzipping). In all cases I was testing over HTTPS. -tim On 3/11/2010 1:04 PM, mdipierro wrote: Rocket 0.3.1 is IN. Please download from trunk and start testing. Use this code db.define_table('image',Field('upload')) Please test upload and download of a large files via appadmin into image table. Please let us know which browser you tested and whether it worked or you experience any problem. Massimo On Mar 11, 12:24 pm, Timothy Farrelltfarr...@swgen.comwrote: snip For a production system, I'm more interested in stability than performance. And despite the admitted arbitrariness of version-numbering choices, it's hard to make the case to management that moving to an 0.x server is safe. What do *you* mean by labeling Rocket 0.x? That's a fair question. When I started, I had a certain set of features and goals that I planned to reach. Upon finishing all of those features and goal, there would be a 1.0 release. Since starting at least three of these goals have fallen by the wayside due to their improbability or lack of flexibility withing Python or the WSGI specification. In the end, I'll probably skip a few 0.x releases and go straight to 1.0 whenever I feel that there are enough of the features I originally set out to include. Like web2py, I strive to make every announced/released version stable enough to include in a project. I've been running web2py on different versions of Rocket for several months now. -tim -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py] Re: meeting tonight
So for those of us who couldn't make it, what were the conclusions? On 3/9/2010 8:28 PM, mr.freeze wrote: Yes - plugins, plugins, plugins!!! I'm anxious to start converting all of my modules to plugins once the spec is somewhat backwards compatible. On Mar 9, 8:18 pm, mdipierromdipie...@cs.depaul.edu wrote: We have a meeting on IRC tonight at 10om central time, right? -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py] Re: meeting tonight
Disregard. I see the other thread. On 3/10/2010 7:44 AM, Timothy Farrell wrote: So for those of us who couldn't make it, what were the conclusions? On 3/9/2010 8:28 PM, mr.freeze wrote: Yes - plugins, plugins, plugins!!! I'm anxious to start converting all of my modules to plugins once the spec is somewhat backwards compatible. On Mar 9, 8:18 pm, mdipierromdipie...@cs.depaul.edu wrote: We have a meeting on IRC tonight at 10om central time, right? -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py] Re: More Questions About Compatibility
It's never that easy. Magnitus, you can use LightTPD on Windows. I'm not sure if it will satisfy the 64-bit requirement though. I've gotten web2py working through FastCGI on LightTPD on windows. Because web2py runs as a separate process, it can be 64-bit while Lighttpd runs 32-bit. Since Lighttpd is only the HTTP-FCGI translator, it won't be hindered by running 32-bit. You can get Lighty for windows here: http://en.wlmp-project.net/downloads.php -tim On 3/8/2010 3:27 PM, Albert Abril wrote: I know it could sounds cruel, but.. try to leave windows On Mon, Mar 8, 2010 at 3:49 PM, Magnitus eric_vallee2...@yahoo.ca mailto:eric_vallee2...@yahoo.ca wrote: LOL. That ambiguous phrasing may be enough to tip Graham Dumpleton over the edge! Yes, well, unless I'm using the language of mathematics, I'm not the best of communicator for technical stuff. I apologize. Others have also spoken enthusiastically about Lighttpd / Nginx in terms of speed, and a smaller memory footprint too, so try searching the group. See these for example: Problem is that I'm developing for windows. I don't have anything against Linux, but learning how to use it in most of the gory details (so that I can run a server on it) would be too much of an overhead at this point in time considering the other things I have to pick up (the only thing I'd pick up reasonably quickly are the C system calls). Nginx's window version is beta (http://nginx.org/en/docs/ windows.html http://nginx.org/en/docs/%0Awindows.html). Cherokee's window version is broken (and will be beta for a while once its functional again). Lighttpd doesn't work on Windows. I'm not sure how well IIS works with anything that is not C# or VB for the web framework and I'm not ready to capitulate to C# just yet. I guess I'll try to figure out how to compile Apache on a newish rendition of windows in 64 bits a bit longer. I found some interesting links for that. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web2py@googlegroups.com mailto:web2py@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com mailto:web2py%2bunsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en. image/gif
Re: [web2py] Re: Getting out from under web2py.py 's environment building magic.
Also remember that web2py is GPL. So your application becomes GPL (if it wasn't already) by importing the DAL. -tim On 3/5/2010 1:34 PM, compassiontara wrote: On Mar 5, 6:17 am, mdipierromdipie...@cs.depaul.edu wrote: On Mar 5, 1:33 am, compassiontarat...@birl.org wrote: I'll probably get flamed for talking about this... Hope not. You have a very good example. Just as a side, you do not necessarily need to copy web2py for the script to work, just add 'gluon' to sys.path. Thanks! this is correct, you can just add gluon to your sys.path, but web2py doesn't by default install itself in the system path(s). So unless I'm missing something you can't use setuptools to require web2py, and leech from there (it would be nice if you could), but that would require changing how gluon import's itself to reference itself instead of assuming everything is local. i.e. instead of: import poralocker it would be: from gluon import portalocker This does require that gluon be part of sys.path, which would then encourage a 'setup.py' or similar to copy it over. Then it would be much easier for external code to use gluon as a library module, and avoid mucking about with sys.path all the time. Unless I'm missing something, which is very possible. With Love, Tara -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py] Re: zen html
The best summary is that it converts a CSS selector into HTML. Watch the video here to get a good idea: http://vimeo.com/7405114 -tim On 2/28/2010 6:43 AM, mdipierro wrote: Can you explain a little bit about what this does? On Feb 26, 10:27 am, Dragonfyre13dragonfyr...@gmail.com wrote: Even better! http://zen-coding.ru/demo/ That is a demo of zenhtml running against editarea, the default editor in web2py. Putting zenhtml with our editarea would be pure awesome. I'd love to see the next version of web2py include zenhtml and zencss included in the next version of web2py, and it doesn't look difficult to throw in there. On Feb 25, 8:13 pm, mdipierromdipie...@cs.depaul.edu wrote: cool. thanks. On Feb 25, 9:49 am, selectagr...@delarue-berlin.de wrote: Sometimes you still have to write html in web2py which is annoying. It might not be new to all of you but I just discovered zen html that really speeds up the process. In my example i customized the zen key to ctrl + z What it does: type div.boxctrl+z and you get div class=box/div with you cursor in the middle of the divs ready to type :) even better tabletr*3tdctrl+z and you get table tr td/td /tr tr td/td /tr tr td/td /tr /table there are plugins for vim, emacs, textmate ...I love it, you might too, check it out here is a vid showing zen htmlhttp://vimeo.com/7405114 and here the projecthttp://code.google.com/p/zen-coding/ I usehttp://www.vim.org/scripts/script.php?script_id=2981 just dropped the plugin into .vim/ftplugin/html/ and edited the shortcut to something convenient :) -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py] Re: zen html
Don't worry Pynthon, it will be an added feature, not replacing any current functionality. It won't hinder things as they currently are. -tim On 3/1/2010 9:20 AM, Pynthon Pynthon wrote: I think it is kool. But IMO I think it is not a good idea to include it in web2py. All this magical stuff, I still vote for normal HTML not generated HTML. Sorry :(. 2010/3/1 mdipierro mdipie...@cs.depaul.edu mailto:mdipie...@cs.depaul.edu I like it. I am going to add this. If nothing breaks it will stay. On Mar 1, 7:28 am, Timothy Farrell tfarr...@swgen.com mailto:tfarr...@swgen.com wrote: The best summary is that it converts a CSS selector into HTML. Watch the video here to get a good idea: http://vimeo.com/7405114 -tim On 2/28/2010 6:43 AM, mdipierro wrote: Can you explain a little bit about what this does? On Feb 26, 10:27 am, Dragonfyre13dragonfyr...@gmail.com mailto:dragonfyr...@gmail.com wrote: Even better! http://zen-coding.ru/demo/ That is a demo of zenhtml running against editarea, the default editor in web2py. Putting zenhtml with our editarea would be pure awesome. I'd love to see the next version of web2py include zenhtml and zencss included in the next version of web2py, and it doesn't look difficult to throw in there. On Feb 25, 8:13 pm, mdipierromdipie...@cs.depaul.edu mailto:mdipie...@cs.depaul.edu wrote: cool. thanks. On Feb 25, 9:49 am, selectagr...@delarue-berlin.de mailto:gr...@delarue-berlin.de wrote: Sometimes you still have to write html in web2py which is annoying. It might not be new to all of you but I just discovered zen html that really speeds up the process. In my example i customized the zen key to ctrl + z What it does: type div.boxctrl+z and you get div class=box/div with you cursor in the middle of the divs ready to type :) even better tabletr*3tdctrl+z and you get table tr td/td /tr tr td/td /tr tr td/td /tr /table there are plugins for vim, emacs, textmate ...I love it, you might too, check it out here is a vid showing zen htmlhttp://vimeo.com/7405114 http://vimeo.com/7405114 and here the projecthttp://code.google.com/p/zen-coding/ http://code.google.com/p/zen-coding/ I usehttp://www.vim.org/scripts/script.php?script_id=2981 http://www.vim.org/scripts/script.php?script_id=2981 just dropped the plugin into .vim/ftplugin/html/ and edited the shortcut to something convenient :) -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web2py@googlegroups.com mailto:web2py@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com mailto:web2py%2bunsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py] Re: Some interrogations concerning Web2py compatibilities
web2py runs flawlessly in Python 2.6. I've been running it for several months. All python code (web2py included) that runs on 2.5 runs on 2.6 as well. The inverse is not true however. The main purpose of Python 2.6 (and the upcoming 2.7) is to facilitate code migration to Python 3.x. It serves as a bridge being as close to compatible with Python 3.x without breaking 2.5 apps. If you run Python 2.6 some standard library modules might issue a warning about using deprecated features (cgitb comes to mind) but that is about the only difference you'll see. web2py currently has no plans to support 3.x due to its backward compatible nature. Something will eventually come along but certain standard libraries are badly broken in 3.x that need fixing before porting a web framework is really plausible. These items needing fixing are the cgi module and the email module it depends on. Work is currently underway to fix the email module. Once that is done, I plan on submitting a patch for the cgi module. Once these issues are addressed, I predict that Python 3 will become the web-language of choice due to the possibility of unladen-swallow being merged in. I write my web2py apps in Python 2.6. -tim On 2/24/2010 6:10 AM, Magnitus wrote: Ah, I'm browsing through the web manual and found this statement which left me with more questions: web2py runs with CPython (the C implementation) and/or Jython (the Java implementation), versions 2.4, 2.5 and 2.6 although officially only support 2.5 else we cannot guarantee backward compatibility for applications. So then python 2.6 is supported unofficially? Would it imply that some of the features from 2.6 are not supported or that the framework has not been tested as thoroughly on 2.6? -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py] Re: they are copying us....
Not if you like Python. On 2/18/2010 6:59 PM, Thadeus Burgess wrote: http://www.coderun.com/ -Thadeus On Thu, Feb 18, 2010 at 8:43 AM, Timothy Farrelltfarr...@swgen.com wrote: kodingen uses Bespin at its core. Try using it in IE and you get this: http://kodingen.com/_browsehappy.html On 2/17/2010 1:07 AM, mdipierro wrote: This is a cool layout and editor. It uses jquery. no syntax highlighting. On Feb 17, 12:49 am, Thadeus Burgessthade...@thadeusb.comwrote: http://kodingen.com/ ?? this seems more along the lines. -Thadeus On Tue, Feb 16, 2010 at 12:29 PM, mikechmp.ch...@gmail.comwrote: To quote a saying: Imitation is the sincerest form of flattery. On Feb 16, 6:48 am, mdipierromdipie...@cs.depaul.eduwrote: sorry was a joke and I did not mean it in a negative ways. I meant to indicate that if before we were taking inspirations from them now thay are taking inspirations from us. I think that is a nice project and perhaps we can learn from it too. On Feb 16, 3:25 am, pistacchiopistacc...@gmail.comwrote: hi massimo, i really appreciate your work on web2py. the product is excellent, i've just launched my first site using it and other two are on the work. i like the new documentation (how it's shaping up) and the way you rule the community around web2py prove that your way is right. i mean, you do a lot of work and coordinate inputs. one thing i really don't understand is your approach to the opensource philosophy. i already pointed it out weeks ago about the non free, pdf documentation that is something really sick in a opensource environment. fortunately i was not the only one thinking this way and, in the end, the online book is now there and shining. now, i think this copying us is utterly out of place. as you stated somewhere, your sources of inspiration were initially django and rails. are you copying them? did you make the idea of web framework by yourself? were you the first one to come out with the mvc pattern? i don't think so, and this is perfect. the opensource community, seen as a whole, not as a series of rival smaller communities that gather around isolated projects, drains its power from the openness of the ideas, from making them circulate and the word copy, with the negative connotation of plagiarize hidden within it, has nothing to do with this. the guy may or may be not been inspired by web2py, but if he was, it is a good thing that web2py did something so valid that other people want to take inspiration from it. if he ends up writing a piece of software that is better than the current web2py's online editor, we can replace it with the new, better one and the circle will be completed as opening an idea would lead to end up with a better product. that's the whole point of opensource. On Feb 16, 5:57 am, mdipierromdipie...@cs.depaul.eduwrote: http://haineault.com/blog/125/ P.S. Of course we have 3 years of head start and the web2py architecture was designed for this, theirs isn't. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/web2py?hl=en. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py] Re: they are copying us....
kodingen uses Bespin at its core. Try using it in IE and you get this: http://kodingen.com/_browsehappy.html On 2/17/2010 1:07 AM, mdipierro wrote: This is a cool layout and editor. It uses jquery. no syntax highlighting. On Feb 17, 12:49 am, Thadeus Burgessthade...@thadeusb.com wrote: http://kodingen.com/ ?? this seems more along the lines. -Thadeus On Tue, Feb 16, 2010 at 12:29 PM, mikechmp.ch...@gmail.com wrote: To quote a saying: Imitation is the sincerest form of flattery. On Feb 16, 6:48 am, mdipierromdipie...@cs.depaul.edu wrote: sorry was a joke and I did not mean it in a negative ways. I meant to indicate that if before we were taking inspirations from them now thay are taking inspirations from us. I think that is a nice project and perhaps we can learn from it too. On Feb 16, 3:25 am, pistacchiopistacc...@gmail.com wrote: hi massimo, i really appreciate your work on web2py. the product is excellent, i've just launched my first site using it and other two are on the work. i like the new documentation (how it's shaping up) and the way you rule the community around web2py prove that your way is right. i mean, you do a lot of work and coordinate inputs. one thing i really don't understand is your approach to the opensource philosophy. i already pointed it out weeks ago about the non free, pdf documentation that is something really sick in a opensource environment. fortunately i was not the only one thinking this way and, in the end, the online book is now there and shining. now, i think this copying us is utterly out of place. as you stated somewhere, your sources of inspiration were initially django and rails. are you copying them? did you make the idea of web framework by yourself? were you the first one to come out with the mvc pattern? i don't think so, and this is perfect. the opensource community, seen as a whole, not as a series of rival smaller communities that gather around isolated projects, drains its power from the openness of the ideas, from making them circulate and the word copy, with the negative connotation of plagiarize hidden within it, has nothing to do with this. the guy may or may be not been inspired by web2py, but if he was, it is a good thing that web2py did something so valid that other people want to take inspiration from it. if he ends up writing a piece of software that is better than the current web2py's online editor, we can replace it with the new, better one and the circle will be completed as opening an idea would lead to end up with a better product. that's the whole point of opensource. On Feb 16, 5:57 am, mdipierromdipie...@cs.depaul.edu wrote: http://haineault.com/blog/125/ P.S. Of course we have 3 years of head start and the web2py architecture was designed for this, theirs isn't. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/web2py?hl=en. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py] apache question. page caching
Clarify this a little. Is Apache serving the static files or is web2py serving them through Apache? On 2/12/2010 10:50 AM, mdipierro wrote: In my setup apache+mod_wsgi serve static files. How do I make sure apache sends a header which sets a long cache time? -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py] Re: apache question. page caching
There are two ways to go about this: Long cache time (only ask for files periodically): # Configure Expires Header for PDFs ExpiresActive On ExpiresByType image/jpeg access plus 1 months ExpiresByType image/jpg access plus 1 months ExpiresByType image/png access plus 1 months ExpiresByType image/gif access plus 1 months ExpiresByType text/css access plus 1 months ExpiresByType text/js access plus 1 months Etags (detect changed files): # Configure Etags to manage browser caches FileETag MTime Size (Contrary to the example,) I use etags for images, css and js files and use Expires headers for other statics files like PDF and SWFs. You might need to add mod_expires depending on your setup. -tim On 2/12/2010 11:30 AM, mdipierro wrote: I use the apache config file configured by this: http://code.google.com/p/web2py/source/browse/scripts/setup-web2py-ubuntu.sh apache serves them directly. This is not a web2py issue but an apache issue. On Feb 12, 11:10 am, Timothy Farrelltfarr...@swgen.com wrote: Clarify this a little. Is Apache serving the static files or is web2py serving them through Apache? On 2/12/2010 10:50 AM, mdipierro wrote: In my setup apache+mod_wsgi serve static files. How do I make sure apache sends a header which sets a long cache time? -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py] Re: apache question. page caching
My church server runs Ubuntu 6.06 (old I know) and it has /usr/lib/apache2/modules/mod_expires.so as part of the normal apache package. Perhaps someone with a newer Ubuntu can help. On 2/12/2010 2:23 PM, mdipierro wrote: I do not have it. How do I install it under ubuntu? On Feb 12, 12:46 pm, Timothy Farrelltfarr...@swgen.com wrote: There are two ways to go about this: Long cache time (only ask for files periodically): # Configure Expires Header for PDFs ExpiresActive On ExpiresByType image/jpeg access plus 1 months ExpiresByType image/jpg access plus 1 months ExpiresByType image/png access plus 1 months ExpiresByType image/gif access plus 1 months ExpiresByType text/css access plus 1 months ExpiresByType text/js access plus 1 months Etags (detect changed files): # Configure Etags to manage browser caches FileETag MTime Size (Contrary to the example,) I use etags for images, css and js files and use Expires headers for other statics files like PDF and SWFs. You might need to add mod_expires depending on your setup. -tim On 2/12/2010 11:30 AM, mdipierro wrote: I use the apache config file configured by this: http://code.google.com/p/web2py/source/browse/scripts/setup-web2py-ub... apache serves them directly. This is not a web2py issue but an apache issue. On Feb 12, 11:10 am, Timothy Farrelltfarr...@swgen.comwrote: Clarify this a little. Is Apache serving the static files or is web2py serving them through Apache? On 2/12/2010 10:50 AM, mdipierro wrote: In my setup apache+mod_wsgi serve static files. How do I make sure apache sends a header which sets a long cache time? -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py] Re: How much memory does web2py need on Unix
You might try commenting out the lines in import_all.py if you're running the source version. That way it doesn't load every module. -tim On 2/10/2010 9:06 PM, raven wrote: Here are the details of memory usage when web2py is NOT running top - 21:58:38 up 11:57, 2 users, load average: 0.00, 0.00, 0.00 Tasks: 10 total, 1 running, 9 sleeping, 0 stopped, 0 zombie Cpu(s): 0.0%us, 0.0%sy, 0.0%ni,100.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st Mem: 65536k total,13320k used,52216k free,0k buffers Swap:0k total,0k used,0k free,0k cached PID USER PR NI VIRT RES SHR S %CPU %MEMTIME+ COMMAND 1 root 15 0 1936 888 628 S0 1.4 0:00.44 init 28126 syslog15 0 1972 668 536 S0 1.0 0:00.29 syslogd 28141 root 15 0 5372 1096 700 S0 1.7 0:00.07 sshd 28151 root 15 0 2468 880 712 S0 1.3 0:00.00 xinetd 28194 root 15 0 2168 924 740 S0 1.4 0:00.08 cron 28246 root 15 0 8176 2808 2240 S0 4.3 0:00.97 sshd 28309 root 18 0 2952 1672 1316 S0 2.6 0:00.02 bash 32170 root 15 0 8172 2804 2240 S0 4.3 0:01.62 sshd 32194 root 15 0 2944 1616 1272 S0 2.5 0:00.00 bash 18279 root 15 0 2384 1104 908 R0 1.7 0:00.17 top Here web2py is running ( I have reduced the numthreads to 2 ) r...@x:~# top top - 21:54:56 up 11:53, 2 users, load average: 0.00, 0.00, 0.00 Tasks: 11 total, 1 running, 10 sleeping, 0 stopped, 0 zombie Cpu(s): 0.0%us, 0.0%sy, 0.0%ni,100.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st Mem: 65536k total,65536k used,0k free,0k buffers Swap:0k total,0k used,0k free,0k cached PID USER PR NI VIRT RES SHR S %CPU %MEMTIME+ COMMAND 1 root 15 0 1936 888 628 S0 1.4 0:00.44 init 28126 syslog15 0 1972 668 536 S0 1.0 0:00.29 syslogd 28141 root 15 0 5372 1096 700 S0 1.7 0:00.07 sshd 28151 root 15 0 2468 880 712 S0 1.3 0:00.00 xinetd 28194 root 15 0 2168 924 740 S0 1.4 0:00.08 cron 28246 root 15 0 8176 2808 2240 S0 4.3 0:00.97 sshd 28309 root 15 0 2952 1672 1316 S0 2.6 0:00.02 bash 32170 root 15 0 8172 2804 2240 S0 4.3 0:01.62 sshd 32194 root 15 0 2944 1616 1272 S0 2.5 0:00.00 bash 14172 root 18 0 63088 25m 4252 S0 40.2 0:04.13 python2.5 18279 root 15 0 2384 1104 908 R0 1.7 0:00.16 top On Feb 10, 8:13 pm, mdipierromdipie...@cs.depaul.edu wrote: Are you sure. Usually VPS includes the OS. On Feb 10, 2:23 pm, ravenravenspo...@yahoo.com wrote: Thank you for your answer. 1. The memory needed by the OS does not count, because I am using a virtual private server. 2. I am using web2py 'out of the box' with its own server, not apache. On Feb 10, 2:36 pm, Thadeus Burgessthade...@thadeusb.com wrote: For one, you have two requirements, an Ubuntu requirement, which far exceeds 64K. I'm not sure an OS can even run on 64K now days. I run web2py + ubuntu + apache_mod_wsgi on several servers, and each instance web2py is only using roughly 15MB. The system uses around 90MB (this is including ubuntu, postgresql, apache). I'm sure a 256MB system will be more than enough for a small site, of course your ram usage goes up with the more requests / db access you have. -Thadeus On Wed, Feb 10, 2010 at 9:40 AM, ravenravenspo...@yahoo.com wrote: web2py is working very well for me on my MSWINDOWS desktop. I am ready to deploy my first application on a virtual private server running Ubuntu with 64K of guaranteed RAM I loaded the web2py source and typed python2.5 web2py.py and immediatly ran out of memory. How much memory do I need to purchase? -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/web2py?hl=en. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py] the team to leave web2py for these abides
I'd like to weigh in on these comments. routes.py: - It seems to me that Django routes are just as complicated: http://docs.djangoproject.com/en/1.1/intro/overview/#design-your-urls - Providing the routes.py outside of an app makes sense for web2py since it directly maps app/controller/function to a url. This decision was made to make things clear and understandable for new developers. Chinese URLs: - perhaps you could have written a patch? - (more info: http://en.wikipedia.org/wiki/Internationalizing_Domain_Names_in_Applications) Standalone Apps: - sessions can master to another application to tie them together. - I use routes to unify all my static content to one app location. Slow Boot: - How often do you restart web2py? It can work as a CGI but only as a stop-gap measure. Any web-developer worth his salt would run a framework in FCGI or WSGI mode. - I don't really care for the import_all.py module either. Errors: - I think the error report leaves much to be desired but at present, I think we're locked in because of backward compatibility. fighting with built-in module -- I'm not sure what you mean here. Too magic: - web2py is designed to be simple. I think how web2py sets headers is appropriate. - I agree that it should set appropriate headers with regard to SSL and static files and IE. No unittests: - Creating unittests requires a culture. - the web2py doesn't seem to have that culture built into it (for better or worse) - While web2py should have unittests, web apps don't mix well with unittests. - Functional tests would be much more appropriate for a web app. Most functional tests would run in the browser anyway (e.g. Qunit) DAL is bad than SQLAlchemy: - This a subjective statement - The DAL is not as well-tested or as widely-used as SQLAlchemy. But it is good enough for the vast majority of web2py users. - The DAL supports migration, SQLAlchemy does not. - The DAL has a cleaner (IMHO) declaration syntax and an uglier query syntax when compared to SQLAlchemy. MVC is insulated: - I'm not sure what you mean here. - Yes they are all in the same namespace. How is this a problem? It's a bummer to see you and your team go. We wish you the best. -tim On 2/4/2010 7:39 AM, Zoom.Quiet wrote: just last week this team to decide by vote to give up web2py, usage Django develping; reasons:: - bad routes.py - changeless pattern for URL had to base routes.py redirect into short URL - routes.py is out app - url can not understand Chinese - tooo stand alone app - session/static ... is all srand alone - can not easy base app slpit site's components - tooo slow boot - import tooo many lib - error report is tooo ugly - can not support debug easy! - fighting with build-in module - https://groups.google.com/group/web2py/browse_thread/thread/e20d0bd2e542aa14/a660bac70d5611a4 - can work with logging - tooo magic - http://stackoverflow.com/questions/150/download-link-fails-in-ie - auto work in background,but not all clean - NULL unittest support! - DAL is bad than SQLAlchemy - MVC is insulated! - model/control/view all variable is in same name space ONLY two feeling good: - deployment is stand alone - but usage yolk+virtualenv others web app. framework also can deplotment stand alone - built-in crontab task support PS: translate from: Mage from hell: 说说 web2py http://blog.hellmage.info/2010/02/web2py.html PPS: hope mdipierro fixed these bad feeling for developer in time; make web2py become realy ent. web app. workframe -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py] Re: making changes in web2py
+1 for anti-brute-forcing -1 for having to edit a pickled file to remove the offending IP. Surely you guys have used a broken keyboard before and typed in a password 10 times before realizing that your keyboard is broken. I recommend locking it out for a time period. You could add a value to the cache for that specific IP address and put an expiration on it. So long as the cache has not lockout value for that IP, then let it login. -tim On 2/3/2010 11:52 PM, mdipierro wrote: I agree. I would take this path. On Feb 3, 11:38 pm, Thadeus Burgessthade...@thadeusb.com wrote: -1 for admin username +1 for anti-brute-forcing. If incorrect password typed 3 times, ban the IP permanently until you log into ssh and edit a pickled file. -Thadeus On Wed, Feb 3, 2010 at 7:07 PM, mdipierromdipie...@cs.depaul.edu wrote: I am confused. appadmin does not requires any. appadmin, by default, required admin (perhaps you refer to that). appadmin predates auth. If your app needs a more complex appadmin authentication you should connect to the auth of the app. admin does not no need more than a passoword because there is a single user (administrator) and because it should not relay on the presence of a database. On Feb 3, 3:22 pm, Wes Jamescompte...@gmail.com wrote: On Wed, Feb 3, 2010 at 1:48 PM, mdipierromdipie...@cs.depaul.edu wrote: snip By the way Massimo, will you take a patch to add a username to appadmin? If not, I'm learning a few things on the way, anyway. please explain more. appadmin only uses a password to login. I'm putting in a username too so it requires a username and password to log in to appadmin. snip -wes -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/web2py?hl=en. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py] admin access from remote machine
Al, I run a similar setup. But it matters which webserver you're using. If you don't know, then you're using the built-in webserver. If you can access the website from the server itself there are two things to check (this assumes the built-in webserver): 1) Did you configure web2py to serve on the '0.0.0.0' interface instead of '127.0.0.1'? 2) Could your firewall on Server 2003 (or otherwise) be blocking the ports? Other than that, we need more details in order to help you. Thanks, -tim On 2/2/2010 4:00 AM, Al wrote: Hi, I have just started to learn web2py recently. I have installed web2py in a windows 2003 server and it runs OK, but I cannot access it from any other machine. I have looked thru a few discussions which described using tunneling and proxy stuff, is there a simple way to disable such security - e.g, commenting a few lines of codes. As the person who will be doing some data entry into my application cannot sit close to the windows server, so I am kind of stuck. Al -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py] EMERGENCY! Major security hole in 1.74.8 fixed in 1.74.9.
Which version was the bug introduced in? My production environment runs an older version than my dev environment. On 2/1/2010 1:56 PM, mdipierro wrote: User sveinh has discovered a major security hole in 1.74.8. This is really major and you should immediately upgrade to 1.74.9. I apologize for this. Massimo -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py] Re: EMERGENCY! Major security hole in 1.74.8 fixed in 1.74.9.
If you know where it is in the code you can always: bzr blame filename That will give you the revision number. From that you should be able to determine the date and then version number. On 2/1/2010 3:36 PM, mdipierro wrote: I am trying to find out. I know it is not in 1.74.1. On Feb 1, 3:23 pm, Timothy Farrelltfarr...@swgen.com wrote: Which version was the bug introduced in? My production environment runs an older version than my dev environment. On 2/1/2010 1:56 PM, mdipierro wrote: User sveinh has discovered a major security hole in 1.74.8. This is really major and you should immediately upgrade to 1.74.9. I apologize for this. Massimo -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py] Replacing template engine
IIRC, response._caller acts like a function decorator. So it takes a function and returns a function. I used to use Genshi like this: def renderGenshi(func): def _render(): output = func() if not isinstance(dict, output): return output else: # real Genshi render code goes here return Genshi.render(response._view, output) return _render response._caller = renderGenshi Naturally it was more complicated than that, but you get the idea. That said, make sure Jinja2 is really what you want. I thought I liked it until I learned that its context is immutable. (This means you can't set response.title in a template and expect that change to propagate to an included or extended template file. This was a deal-breaker for me.) In case you're curious, I switched off of Genshi back to web2py templates because Genshi only works on normal cPython platforms. It blows up on Jython or AIX Python. -tim On 1/26/2010 9:05 PM, Thadeus Burgess wrote: Its going to be your best bet in using a different templating language. YOu will have to make sure to only parse your HTML requests and not json/download etc. Basically, response._caller is a function, that returns a string which is the html. So you would instead of response.render(d) you would do jinja2.render(d) where d is the dict returned from the action, you will of course have to tell jinja where to find templates and which template to render based on action jinja.render(d, '/applications/init/views/' + request.action+'.html') -Thadeus On Tue, Jan 26, 2010 at 8:24 PM, Alexandre airm...@gmail.com mailto:airm...@gmail.com wrote: Hi, I want to replace web2py's template engine with Jinja 2 http://jinja.pocoo.org/2/, anyone has some experience doing something similar? I'm trying to assign response._caller with a custom function, but I'm not having much success, is that the right way? Thanks, Alexandre Rosenfeld Eng Comp 06 - USP São Carlos FoG - http://fog.icmc.usp.br IM Team - AIESEC -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web2py@googlegroups.com mailto:web2py@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com mailto:web2py%2bunsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py] RFC @completion
I'm not knocking it because it's syntactic sugar, but you could already do this by setting response._caller right? On 1/26/2010 10:05 AM, mdipierro wrote: With current trunk you can now do: from gluon.tools import completion def callback(d): print '',d @completion(callback) def test(): return dict(value=hello World) What do you think? -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Jython route fix
So I'm tinkering with Jython again. Last time I tinkered, I found that routes didn't work (for static files). I just found out why...but before the explanation...the fix: change: if isinstance(stream, str): in response.stream() to: if isinstance(stream, (str, unicode)): The reason why is because the routing process in Jython (namely regexp transformation) turns the string into a unicode object because it uses Java's regexp library (which only uses unicode strings). -tim -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.