Hi Allessandro,

I tried adding the WSGIApplicationGroup %{GLOBAL}, and the 
WSGIDaemonProcees and WSGIProcessGroup has been in  my apache config since 
the start.

I have been using this WSGI config for pre- 2.2.2 version of turbogears and 
is working fine. 

My config for apache virtual host is given below.

Many thanks for any help

Best Regards,

Neil
+++++++++++++++++++++Apache config+++++++++++++++++


WSGIPythonHome /usr/local/turbogears/sorter
# TODO: confirm that this line is appropriate for Daemon mode...
WSGIPythonPath /usr/local/turbogears/sorter/lib/python2.6/site-packages

NameVirtualHost *:9090

# This block configures our particular named virtual host
<VirtualHost *:9090>
#    ServerName xxx.xxx.xxx.xxx:9090
# Allow apache to serve static content.
# Your site is configured to mount at / (use --mount to change this)

Alias /images /usr/local/turbogears/sorter/sorter/sorter/public/images
Alias /css /usr/local/turbogears/sorter/sorter/sorter/public/css
Alias /javascript 
/usr/local/turbogears/sorter/sorter/sorter/public/javascript

# Choose deamon mode with 10 threads and 3 processes.
# For small to medium website.
WSGIDaemonProcess sorter threads=10 processes=3
WSGIApplicationGroup %{GLOBAL}
WSGIProcessGroup sorter
WSGIScriptAlias / /usr/local/turbogears/sorter/sorter/apache/sorter.wsgi

# Directory Permissions.
<Directory /usr/local/turbogears/sorter/sorter/apache>
Order deny,allow
Allow from all
</Directory>

</VirtualHost>



On Friday, February 15, 2013 5:47:48 PM UTC+8, Alessandro Molina wrote:
>
> If your database driver is using C extension you might need to configure 
> mod_wsgi properly as otherwise it might have random failures due to 
> subinterpreters creation.
>
> You might want to try to configured mod_wsgi with WSGIApplicationGroup 
> %{GLOBAL} and WSGIDaemonProcess+WSGIProcessGroup this makes sure that no 
> subinterpreters are used and each python app is constrained to its own 
> process space and interpreter.
>
>
>
> On Fri, Feb 15, 2013 at 1:20 AM, Neil Ablang <[email protected]<javascript:>
> > wrote:
>
>> Hello,
>>
>> The ini file is the same as that of paster. The DB uri is the same. When 
>> I run 'paster serve production.ini --daemon' , I have no errors.  When 
>> running under wsgi, the sqlalchemy error props up. For now, I am running my 
>> app using the paster daemon mode since the apache wsgi is spewing up that 
>> NoSuchColumnError.
>>
>> sql URL :
>>
>> sqlalchemy.url=postgresql://yyyyy:[email protected]:5432/sorterDB
>>
>>
>> Best Regards,
>>
>> Neil
>>
>>
>>
>>
>> On Thursday, February 14, 2013 7:44:42 PM UTC+8, Moritz Schlarb wrote:
>>>
>>> How do you configure mod_wsgi for Apache?
>>> Which configuration file did you use there? development.init/deployment.
>>> **ini_tmpl?
>>> Which configuration file did you use to create the database - was 
>>> sqlalchemy.uri the same?
>>>
>>> Maybe post the relevant configuration files here (check for passwords, 
>>> of course...).
>>>
>>> Am Donnerstag, 14. Februar 2013 01:32:59 UTC+1 schrieb Neil Ablang:
>>>>
>>>> Hello,
>>>>
>>>>
>>>> here is my table from model folder. Its working on my paster serve 
>>>> setup. Yes the DB is created, The __init__.py  has also been updated to 
>>>> add 
>>>> the models below.
>>>>
>>>> thanks in advance for any help.
>>>>
>>>>
>>>> # -*- coding: utf-8 -*-
>>>> """Sample model module."""
>>>>
>>>> from sqlalchemy import *
>>>> from sqlalchemy.orm import mapper, relation
>>>> from sqlalchemy import Table, ForeignKey, Column
>>>> from sqlalchemy.types import Integer, Unicode
>>>> #from sqlalchemy.orm import relation, backref
>>>>
>>>> from sorter.model import DeclarativeBase, metadata, DBSession
>>>>
>>>>
>>>> class SortedFiles(DeclarativeBase):
>>>>     """Table for Sorted Files"""
>>>>     __tablename__ = "BNTSortedFiles"
>>>>
>>>>     record_id = Column(Integer, primary_key=True)
>>>>     fileName = Column(String,nullable=True,**unique=True)
>>>>     docTitle = Column(String,nullable=True)
>>>>     docTag = Column(String,nullable=True)
>>>>     docType = Column(String,nullable=True)
>>>>     recDate = Column(String,nullable=True)
>>>>     group = Column(String,nullable=True)
>>>>     jobName = Column(String,nullable=True)
>>>>     stateCounty = Column(String,nullable=True)
>>>>     ftpPath = Column(String,nullable=True)
>>>>     move = Column(Boolean,nullable=False,**default='False')
>>>>     dispatch = Column(Boolean,nullable=False,**default='False')
>>>>     done= Column(Boolean,nullable=False,**default='False')
>>>>
>>>> class StateCountyRecDate(**DeclarativeBase):
>>>>     """Table for State County Recording Date"""
>>>>     __tablename__ = "StateCountyRecDate"
>>>>     
>>>>     record_id = Column(Integer, primary_key=True)
>>>>     recDate = Column(String,nullable=True)
>>>>     stateCounty = Column(String,nullable=True)
>>>>     dtaImgStatus = Column(Boolean,nullable=False,**default='False')
>>>>
>>>> On Thursday, February 14, 2013 3:15:39 AM UTC+8, Mengu wrote:
>>>>>
>>>>> have you set your database information in your config file and have 
>>>>> you created your database and tables? also, let us see your model. 
>>>>>
>>>>> On Feb 13, 11:22 am, Neil Ablang <[email protected]> wrote: 
>>>>> > Hello, 
>>>>> > 
>>>>> > My turbogears application is working fine with paster serve. 
>>>>> > 
>>>>> > But when deployedto Apache Httpd, Im encountering the error: 
>>>>> > NoSuchColumnError: "Could not locate column in row for column 
>>>>> > 
>>>>> > Without database access there are no errors. 
>>>>> > 
>>>>> > What have I done wrong? I used the procedure to install turbogears 
>>>>> as 
>>>>> > describe in turbogears main page. 
>>>>> > 
>>>>> > Error transcript provided below: 
>>>>> > 
>>>>> > Best Regards, 
>>>>> > 
>>>>> > Neil Ablang 
>>>>> > 
>>>>> > [Wed Feb 13 17:08:24 2013] [error] [client ]     stateList = 
>>>>> > DBSession.query(**StateCountyRecDate).all() 
>>>>> > [Wed Feb 13 17:08:24 2013] [error] [client ]   File 
>>>>> > "/usr/local/turbogears/sorter/**lib/python2.6/site-packages/**SQLAlchemy-0.7.9-
>>>>> >  
>>>>> py2.6-linux-i686.egg/**sqlalchemy/orm/query.py", 
>>>>> > line 2115, in all 
>>>>> > [Wed Feb 13 17:08:24 2013] [error] [client ]     return list(self) 
>>>>> > [Wed Feb 13 17:08:24 2013] [error] [client ]   File 
>>>>> > "/usr/local/turbogears/sorter/**lib/python2.6/site-packages/**SQLAlchemy-0.7.9-
>>>>> >  
>>>>> py2.6-linux-i686.egg/**sqlalchemy/orm/query.py", 
>>>>> > line 2348, in instances 
>>>>> > [Wed Feb 13 17:08:24 2013] [error] [client ]     rows = 
>>>>> [process[0](row, 
>>>>> > None) for row in fetch] 
>>>>> > [Wed Feb 13 17:08:24 2013] [error] [client ]   File 
>>>>> > "/usr/local/turbogears/sorter/**lib/python2.6/site-packages/**SQLAlchemy-0.7.9-
>>>>> >  
>>>>> py2.6-linux-i686.egg/**sqlalchemy/orm/mapper.py", 
>>>>> > line 2029, in _instance 
>>>>> > [Wed Feb 13 17:08:24 2013] [error] [client ]     tuple([row[column] 
>>>>> for 
>>>>> > column in pk_cols]) 
>>>>> > [Wed Feb 13 17:08:24 2013] [error] [client ]   File 
>>>>> > "/usr/local/turbogears/sorter/**lib/python2.6/site-packages/**SQLAlchemy-0.7.9-
>>>>> >  
>>>>> py2.6-linux-i686.egg/**sqlalchemy/engine/base.py", 
>>>>> > line 2834, in _key_fallback 
>>>>> > [Wed Feb 13 17:08:24 2013] [error] [client ] 
>>>>> > expression._string_or_**unprintable(key)) 
>>>>> > [Wed Feb 13 17:08:24 2013] [error] [client ] NoSuchColumnError: 
>>>>> "Could not 
>>>>> > locate column in row for column 'StateCountyRecDate.record_id'**" 
>>>>>
>>>>  -- 
>> You received this message because you are subscribed to the Google Groups 
>> "TurboGears" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> To post to this group, send email to [email protected]<javascript:>
>> .
>> Visit this group at http://groups.google.com/group/turbogears?hl=en.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>  
>>  
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/turbogears?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to