Is it lua-dbi or Prosody keeping long running DB queries open?

90 views
Skip to first unread message

Simon Tennant

unread,
May 10, 2013, 12:43:32 PM5/10/13
to proso...@googlegroups.com
Prosody seems to keep one query running on postgres:

postgres=# SELECT datname,procpid,current_query FROM pg_stat_activity
;
      datname       | procpid |                       current_query                        
--------------------+---------+------------------------------------------------------------
 buddycloud-prosody |   29028 | <IDLE> in transaction
 buddycloud-prosody |   30228 | <IDLE> in transaction
 postgres           |   29539 | SELECT datname,procpid,current_query FROM pg_stat_activity+

and the query seems to run as long as Prosody is running:

https://munin.buddycloud.com/buddycloud.com/abyss.buddycloud.com/postgres_querylength_ALL.html

Should I worry?

Should I worry at the lua-dbi team (Hi Matt :) or the Prosody team (Hi Matt again)?

S.

--
Simon Tennant | buddycloud.com | +49 17 8545 0880 | office hours: goo.gl/tQgxP

Matthew Wild

unread,
May 11, 2013, 5:23:58 AM5/11/13
to Prosody IM Developers Group
Hi,

On 10 May 2013 17:43, Simon Tennant <si...@buddycloud.com> wrote:
> Prosody seems to keep one query running on postgres:
>
> postgres=# SELECT datname,procpid,current_query FROM pg_stat_activity
> ;
> datname | procpid | current_query
> --------------------+---------+------------------------------------------------------------
> buddycloud-prosody | 29028 | <IDLE> in transaction
> buddycloud-prosody | 30228 | <IDLE> in transaction
> postgres | 29539 | SELECT datname,procpid,current_query FROM
> pg_stat_activity+
>
> and the query seems to run as long as Prosody is running:
>
> https://munin.buddycloud.com/buddycloud.com/abyss.buddycloud.com/postgres_querylength_ALL.html
>
> Should I worry?
>
> Should I worry at the lua-dbi team (Hi Matt :) or the Prosody team (Hi Matt
> again)?

You should probably worry at me.

I thought maybe perhaps LuaDBI was opening the transaction immediately
after finishing the last (so that it always had a transaction open).
But if munin is actually showing the query age as it claims to be...
that doesn't seem like the correct answer.

I have some SQL testing on my todo, and a LuaDBI release (what version
are you using by the way?). I'll see if I can reproduce this.

Regards,
Matthew

Simon Tennant

unread,
May 11, 2013, 5:31:16 AM5/11/13
to proso...@googlegroups.com
Here's what we're running. Let me know if you would like me to try anything newer.

ii  lua-dbi-common                            0.5+svn78-4                         DBI library for the Lua language, common files
ii  lua-dbi-postgresql                        0.5+svn78-4                         DBI library for the Lua language, PostgreSQL backend




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


Reply all
Reply to author
Forward
0 new messages