----- Original Message -----
From: Roger Haase <crosseyedpeng...@yahoo.com>
To: Discussion of Webware for Python including feedback and proposals. 
<webware-discuss@lists.sourceforge.net>
Cc: 
Sent: Saturday, July 23, 2011 4:57 AM
Subject: Re: [Webware-discuss] Webware times out on WebFaction Hosting service





----- Original Message -----
From: Christoph Zwerschke <c...@online.de>
To: Discussion of Webware for Python including feedback and proposals. 
<webware-discuss@lists.sourceforge.net>
Cc: 
Sent: Saturday, July 23, 2011 2:20 AM
Subject: Re: [Webware-discuss] Webware times out on WebFaction Hosting service

Am 23.07.2011 07:05 schrieb Roger Haase:
> I have added a WebFaction "Custom app (listening on port)" to obtain
> a unique port number. Then I modified my wsgiadapter to point at
> 184.172.207.73:41759 and modified the app serverconfiguration to
> listen at the same address.

Which Webware version are you using? Webware normally connects to Apache 
via mod_webkit; only the last beta supports mod_wsgi.

-- Christoph

------------------------------------------

I have been running Webware 1.1b1 with the mod_wsgi adapter since May, 2010 on 
Ubuntu 10.04 and Ubuntu 11.04.  The Python version is 2.7.1 on Webfaction.  

I will start over with a clean installation of Webware and give the mod_webkit 
adapter a try if the problems with wsgi continue.

Chuck and Christof, thanks for your thoughts.

Roger Haase

-----------------------------------------
I have some progress.  I think the WSGIAdapter.py has a bug -- I could not use 
a non-standard port on Ubuntu 11.04.  I copied a few lines of code from 
CGIAdapter.py to read adapter.address and pass on the host and port.  My Patch:

"""
diff -r 326014bd2b8f WebKit/Adapters/WSGIAdapter.py
--- a/WebKit/Adapters/WSGIAdapter.py    Sun Jul 24 14:37:54 2011 -0700
+++ b/WebKit/Adapters/WSGIAdapter.py    Sun Jul 24 14:52:42 2011 -0700
@@ -7,7 +7,7 @@
 This script expects to find a file in its directory called 
 'adapter.address' that specifies the address of the app server. 
 If the address file is not found, the address is taken from 
-the configuration file called 'WSGIAdapter.conf'. 
+the configuration file called 'WSGIAdapter.config'. 
  
 Contributed to Webware for Python by Christoph Zwerschke, 04/2010. 
  
@@ -55,6 +55,11 @@
     def __call__(self, environ, start_response): 
         """The actual WSGI application.""" 
         err = StdErr(environ.get('wsgi.errors', None)) 
+        host, port = open(os.path.join(self._webKitDir, 
+            'adapter.address')).read().split(':', 1) 
+        if os.name == 'nt' and not host: 
+            host = 'localhost' # MS Windows doesn't like a blank host name 
+        port = int(port) 
         try: 
             inp = environ.get('wsgi.input', None) 
             if inp is not None: 
@@ -73,7 +78,7 @@
             environ = dict(item for item in environ.iteritems() 
                 if isinstance(item[1], (bool, int, long, float, 
                     str, unicode, tuple, list, set, frozenset, dict))) 
-            response = self.getChunksFromAppServer(environ, inp or '') 
+            response = self.getChunksFromAppServer(environ, inp or '', 
host=host, port=port) 
             header = [] 
             for chunk in response: 
                 if header is None:
"""

The above works for me on Ubuntu 11.04.  I am not sure if the additional code 
should be moved down within the try statement.  

I am still working on resolving the WebFaction problem.  With the patch 
applied, I now get "bad marshall data" errors.  This is my first experience 
with web hosts.  There are about 170 other users on my server and nginx is used 
to give each user their own apache conf file.  I suspect nginx has some kind of 
attachment to my "custom port" that is causing the problem, but am still 
looking.

Roger Haase





                 if header is None:


------------------------------------------------------------------------------
Magic Quadrant for Content-Aware Data Loss Prevention
Research study explores the data loss prevention market. Includes in-depth
analysis on the changes within the DLP market, and the criteria used to
evaluate the strengths and weaknesses of these DLP solutions.
http://www.accelacomm.com/jaw/sfnl/114/51385063/
_______________________________________________
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to