Well, I've commented out the line of the postgresql adapter of web2py, the line where it runs the SET standard_conforming_strings=on; but now it hangs in the previous line "SET CLIENT_ENCODING TO 'UTF8'".
This is the function of the web2py's adapter where the application hangs: https://github.com/web2py/pydal/blob/master/pydal/adapters/postgres.py#L107 For what I see, that function is called after connection, as its name dictates "after_connection()" What could possibly be hanging between the DAL() instantiation and the function after_connection() run by web2py? El miércoles, 2 de mayo de 2018, 16:09:31 (UTC-3), Lisandro escribió: > > Hi there, sorry to bother in this old post. > > I'm having a problem regarding standard_conforming_strings. > Today my app experienced a problem with Redis going out of memory. > After the problem was fixed, all my websites started to work normally, > except four of them (of a total of 260 websites). > > For these websites don't working, the problem was a 504 timeout. > When I checked for long running queries, I see this: > > 11622 | cipollettiinforma | medios | 127.0.0.1 | 00:00:59.493348 | > 2018-05-02 16:04:36.006134-03 | f | idle in transaction | SET > standard_conforming_strings=on; > 11635 | cipollettiinforma | medios | 127.0.0.1 | 00:00:57.579705 | > 2018-05-02 16:04:37.919777-03 | f | idle in transaction | SET > standard_conforming_strings=on; > 11651 | cipollettiinforma | medios | 127.0.0.1 | 00:00:55.500219 | > 2018-05-02 16:04:39.999263-03 | f | idle in transaction | SET > standard_conforming_strings=on; > 11693 | cipollettiinforma | medios | 127.0.0.1 | 00:00:50.412742 | > 2018-05-02 16:04:45.08674-03 | f | idle in transaction | SET > standard_conforming_strings=on; > 11801 | cipollettiinforma | medios | 127.0.0.1 | 00:00:36.528754 | > 2018-05-02 16:04:58.970728-03 | f | idle in transaction | SET > standard_conforming_strings=on; > 11853 | cipollettiinforma | medios | 127.0.0.1 | 00:00:31.644218 | > 2018-05-02 16:05:03.855264-03 | f | idle in transaction | SET > standard_conforming_strings=on; > 11904 | cipollettiinforma | medios | 127.0.0.1 | 00:00:25.186631 | > 2018-05-02 16:05:10.312851-03 | f | idle in transaction | SET > standard_conforming_strings=on; > 11945 | cipollettiinforma | medios | 127.0.0.1 | 00:00:21.143921 | > 2018-05-02 16:05:14.355561-03 | f | idle in transaction | SET > standard_conforming_strings=on; > 11998 | cipollettiinforma | medios | 127.0.0.1 | 00:00:13.615864 | > 2018-05-02 16:05:21.883618-03 | f | idle in transaction | SET > standard_conforming_strings=on; > > > That, for every database of these four websites. > Of course I tried to clean redis cache, but the problem remains. > > How should I countinue investigating? Where? > > > El domingo, 24 de noviembre de 2013, 22:45:08 (UTC-3), Massimo Di Pierro > escribió: >> >> We can make it optional. Please open a ticket. >> >> On Sunday, 24 November 2013 02:28:23 UTC-6, Jayadevan M wrote: >>> >>> My doubt is - do we need to explicitly set it ON? Since the default >>> setting is ON, any client connecting will have it turned ON anyway? >>> >>> On Sunday, November 24, 2013 1:48:23 PM UTC+5:30, Massimo Di Pierro >>> wrote: >>>> >>>> It must be done for every connection. Do you have connection pooling >>>> on? If a connection is recycled it should not do it again. >>>> >>>> On Saturday, 23 November 2013 22:49:47 UTC-6, Jayadevan M wrote: >>>>> >>>>> Thanks for the reply. OK, let us take this forward on the first one >>>>> (default behaviour). Since the default behaviour is to SET >>>>> standard_conforming_strings=on, is there a need to do it again, for each >>>>> connection/call? It will incur an ever-so-small overhead which can be >>>>> avoided? >>>>> >>>>> On Saturday, November 23, 2013 7:31:00 PM UTC+5:30, Massimo Di Pierro >>>>> wrote: >>>>>> >>>>>> You raise two issues: >>>>>> >>>>>> 1) About >>>>>> SET standard_conforming_strings=on >>>>>> This is required and in fact as you say it is the default behavior >>>>>> since 9.1. This has nothing to do which locking. >>>>>> >>>>>> 2) You see exclusive locks. Which locks? Can you say more? >>>>>> >>>>>> >>>>>> >>>>>> On Saturday, 23 November 2013 05:53:02 UTC-6, Jayadevan M wrote: >>>>>>> >>>>>>> I am testing our web2py application with a few concurrent users. >>>>>>> While monitoring the database (PostgreSQL), I can see a number of >>>>>>> exclusive >>>>>>> locks. The SQL is >>>>>>> SET standard_conforming_strings=on >>>>>>> Is this expected behaviour? >>>>>>> >>>>>> -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.