Are your servers behing a load balancer? If so, do you have sticky
sessions? If not you may run into trouble if two servers try access
the same session.



On Nov 30, 1:25 am, Rohan <[email protected]> wrote:
> web2py version: 1.98.2
>
> I have two servers with shared database and I am trying to store session in
> database using
>     session.connect(request, response, db=db, migrate=False)
>
> but  session._try_store_in_db is throwing Internal Error from one of the
> servers but it works fine from second server.
> Here is traceback
>
> Traceback (most recent call last):
>   File &quot;/home/www-data/web2py/gluon/main.py&quot;, line 497, in
> wsgibase
>     session._try_store_in_db(request, response)
>   File &quot;/home/www-data/web2py/gluon/globals.py&quot;, line 474, in
> _try_store_in_db
>     record_id = table.insert(**dd)
>   File &quot;/home/www-data/web2py/gluon/dal.py&quot;, line 4786, in insert
>     return self._db._adapter.insert(self,self._listify(fields))
>   File &quot;/home/www-data/web2py/gluon/dal.py&quot;, line 844, in insert
>     raise e
> InternalError: current transaction is aborted, commands ignored until end
> of transaction block
>
> Any pointers will be appreciated
> Regards

Reply via email to