I am suddenly getting this error when either trying to access the website that uses the postgresql database, or even when using the psql utility or pgadmin3.
My database is set to handle 150 maximum connections:
# SHOW max_connections;
max_connections
-----------------
150
(1 row)
After rebooting the ubuntu server which my website is on (which is really the only thing using connections), I see the current amount of connections is 140:
# select count(*) from pg_stat_activity;
count
-------
140
(1 row)
I don’t understand how suddenly so many connections after rebooting my server. So I check the postgresql activity:
# SELECT * FROM pg_stat_activity;
And I see over a 100 columns with the same exact query that looks like this:
SELECT "reports".* FROM "reports" WHERE (("reports"."time" < '2014-06-28 13:30:42.000000' AND "reports"."unit_id" = 3192)) ORDER BY "reports"."id" DESC LIMIT 1
Even more important is they all have the same client address (my web server).
This web server is using ruby on rails with a connection pool of 50. Even though there is a connection pool of 50, the Passenger process/prefork apache configuration is single-threaded and therefore each process cannot spawn 50 threads and 50 database connections. What’s more is this occurred after a system reboot which knocked all users off my web server. The likelihood is that postgresql on the database server is not aware of the web server reboot and is still trying to execute these queries.
To answer Craig’s comments, under waiting column it shows the letter ‘f’. It appears that the query is still executing and the lock has not been released yet. As I previously stated, what is so strange is that suddenly over 100 queries identical to each other within milliseconds apart suddenly appeared in this execution state. That’s the mystery to me:
mydb=# SELECT * FROM pg_stat_activity;
datid | datname | procpid | usesysid | usename | current_query | waiting | xact_start | query_start | backend_start | client_addr | client_port
--------+----------+---------+----------+---------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------+-------------------------------+-------------------------------+-------------------------------+----------------+-------------
464875 | mydb | 4992 | 16387 | myuser | SELECT "reports".* FROM "reports" WHERE (("reports"."time" < '2014-06-28 13:30:42.000000' AND "reports"."unit_id" = 3192)) ORDER BY "reports"."id" DESC LIMIT 1 | f | 2014-06-28 22:46:48.437081-04 | 2014-06-28 22:46:48.437081-04 | 2014-06-28 22:46:44.089764-04 | 192.111.11.111 | 37166
464875 | mydb | 4993 | 16387 | myuser | SELECT "reports".* FROM "reports" WHERE (("reports"."time" < '2014-06-28 13:30:42.000000' AND "reports"."unit_id" = 3192)) ORDER BY "reports"."id" DESC LIMIT 1 | f | 2014-06-28 22:46:48.497764-04 | 2014-06-28 22:46:48.497764-04 | 2014-06-28 22:46:44.277856-04 | 192.111.11.111 | 37167
464875 | mydb | 4994 | 16387 | myuser | SELECT "reports".* FROM "reports" WHERE (("reports"."time" < '2014-06-28 13:30:42.000000' AND "reports"."unit_id" = 3192)) ORDER BY "reports"."id" DESC LIMIT 1 | f | 2014-06-28 22:46:48.504425-04 | 2014-06-28 22:46:48.504425-04 | 2014-06-28 22:46:44.485269-04 | 192.111.11.111 | 37168
464875 | mydb | 4996 | 16387 | myuser | SELECT "reports".* FROM "reports" WHERE (("reports"."time" < '2014-06-28 13:30:42.000000' AND "reports"."unit_id" = 3192)) ORDER BY "reports"."id" DESC LIMIT 1 | f | 2014-06-28 22:46:48.482695-04 | 2014-06-28 22:46:48.482695-04 | 2014-06-28 22:46:44.688203-04 | 192.111.11.111 | 37169
464875 | mydb | 4998 | 16387 | myuser | SELECT "reports".* FROM "reports" WHERE (("reports"."time" < '2014-06-28 13:30:42.000000' AND "reports"."unit_id" = 3192)) ORDER BY "reports"."id" DESC LIMIT 1 | f | 2014-06-28 22:46:48.432836-04 | 2014-06-28 22:46:48.432836-04 | 2014-06-28 22:46:44.703883-04 | 192.111.11.111 | 37170
464875 | mydb | 4999 | 16387 | myuser | SELECT "reports".* FROM "reports" WHERE (("reports"."time" < '2014-06-28 13:30:42.000000' AND "reports"."unit_id" = 3192)) ORDER BY "reports"."id" DESC LIMIT 1 | f | 2014-06-28 22:46:48.434339-04 | 2014-06-28 22:46:48.434339-04 | 2014-06-28 22:46:44.923901-04 | 192.111.11.111 | 37171
464875 | mydb | 5000 | 16387 | myuser | SELECT "reports".* FROM "reports" WHERE (("reports"."time" < '2014-06-28 13:30:42.000000' AND "reports"."unit_id" = 3192)) ORDER BY "reports"."id" DESC LIMIT 1 | f | 2014-06-28 22:46:48.444087-04 | 2014-06-28 22:46:48.444087-04 | 2014-06-28 22:46:44.952341-04 | 192.111.11.111 | 37173
464875 | mydb | 5001 | 16387 | myuser | SELECT "reports".* FROM "reports" WHERE (("reports"."time" < '2014-06-28 13:30:42.000000' AND "reports"."unit_id" = 3192)) ORDER BY "reports"."id" DESC LIMIT 1 | f | 2014-06-28 22:46:48.407919-04 | 2014-06-28 22:46:48.407919-04 | 2014-06-28 22:46:45.191129-04 | 192.111.11.111 | 37174
464875 | mydb | 5002 | 16387 | myuser | SELECT "reports".* FROM "reports" WHERE (("reports"."time" < '2014-06-28 13:30:42.000000' AND "reports"."unit_id" = 3192)) ORDER BY "reports"."id" DESC LIMIT 1 | f | 2014-06-28 22:46:48.399368-04 | 2014-06-28 22:46:48.399368-04 | 2014-06-28 22:46:45.217456-04 | 192.111.11.111 | 37175
464875 | mydb | 5003 | 16387 | myuser | SELECT "reports".* FROM "reports" WHERE (("reports"."time" < '2014-06-28 13:30:42.000000' AND "reports"."unit_id" = 3192)) ORDER BY "reports"."id" DESC LIMIT 1 | f | 2014-06-28 22:46:48.421065-04 | 2014-06-28 22:46:48.421065-04 | 2014-06-28 22:46:45.516578-04 | 192.111.11.111 | 37176
464875 | mydb | 5004 | 16387 | myuser | SELECT "reports".* FROM "reports" WHERE (("reports"."time" < '2014-06-28 13:30:42.000000' AND "reports"."unit_id" = 3192)) ORDER BY "reports"."id" DESC LIMIT 1 | f | 2014-06-28 22:46:48.427596-04 | 2014-06-28 22:46:48.427596-04 | 2014-06-28 22:46:45.530614-04 | 192.111.11.111 | 37177
464875 | mydb | 5005 | 16387 | myuser | SELECT "reports".* FROM "reports" WHERE (("reports"."time" < '2014-06-28 13:30:42.000000' AND "reports"."unit_id" = 3192)) ORDER BY "reports"."id" DESC LIMIT 1 | f | 2014-06-28 22:46:48.40033-04 | 2014-06-28 22:46:48.40033-04 | 2014-06-28 22:46:45.542883-04 | 192.111.11.111 | 37178
464875 | mydb | 5006 | 16387 | myuser | SELECT "reports".* FROM "reports" WHERE (("reports"."time" < '2014-06-28 13:30:42.000000' AND "reports"."unit_id" = 3192)) ORDER BY "reports"."id" DESC LIMIT 1 | f | 2014-06-28 22:46:48.378659-04 | 2014-06-28 22:46:48.378659-04 | 2014-06-28 22:46:45.556367-04 | 192.111.11.111 | 37179
464875 | mydb | 5007 | 16387 | myuser | SELECT "reports".* FROM "reports" WHERE (("reports"."time" < '2014-06-28 13:30:42.000000' AND "reports"."unit_id" = 3192)) ORDER BY "reports"."id" DESC LIMIT 1 | f | 2014-06-28 22:46:48.484524-04 | 2014-06-28 22:46:48.484524-04 | 2014-06-28 22:46:45.5689-04 | 192.111.11.111 | 37180
464875 | mydb | 5008 | 16387 | myuser | SELECT "reports".* FROM "reports" WHERE (("reports"."time" < '2014-06-28 13:30:42.000000' AND "reports"."unit_id" = 3192)) ORDER BY "reports"."id" DESC LIMIT 1 | f | 2014-06-28 22:46:48.513752-04 | 2014-06-28 22:46:48.513752-04 | 2014-06-28 22:46:45.586375-04 | 192.111.11.111 | 37181
464875 | mydb | 5009 | 16387 | myuser | SELECT "reports".* FROM "reports" WHERE (("reports"."time" < '2014-06-28 13:30:42.000000' AND "reports"."unit_id" = 3192)) ORDER BY "reports"."id" DESC LIMIT 1 | f | 2014-06-28 22:46:48.512811-04 | 2014-06-28 22:46:48.512811-04 | 2014-06-28 22:46:45.601429-04 | 192.111.11.111 | 37182
464875 | mydb | 5010 | 16387 | myuser | SELECT "reports".* FROM "reports" WHERE (("reports"."time" < '2014-06-28 13:30:42.000000' AND "reports"."unit_id" = 3192)) ORDER BY "reports"."id" DESC LIMIT 1 | f | 2014-06-28 22:46:48.45908-04 | 2014-06-28 22:46:48.45908-04 | 2014-06-28 22:46:45.614041-04 | 192.111.11.111 | 37183
464875 | mydb | 5011 | 16387 | myuser | SELECT "reports".* FROM "reports" WHERE (("reports"."time" < '2014-06-28 13:30:42.000000' AND "reports"."unit_id" = 3192)) ORDER BY "reports"."id" DESC LIMIT 1 | f | 2014-06-28 22:46:48.441336-04 | 2014-06-28 22:46:48.441336-04 | 2014-06-28 22:46:45.62609-04 | 192.111.11.111 | 37184
464875 | mydb | 5012 | 16387 | myuser | SELECT "reports".* FROM "reports" WHERE (("reports"."time" < '2014-06-28 13:30:42.000000' AND "reports"."unit_id" = 3192)) ORDER BY "reports"."id" DESC LIMIT 1 | f | 2014-06-28 22:46:48.40679-04 | 2014-06-28 22:46:48.40679-04 | 2014-06-28 22:46:45.639811-04 | 192.111.11.111 | 37185
464875 | mydb | 5014 | 16387 | myuser | SELECT "reports".* FROM "reports" WHERE (("reports"."time" < '2014-06-28 13:30:42.000000' AND "reports"."unit_id" = 3192)) ORDER BY "reports"."id" DESC LIMIT 1 | f | 2014-06-28 22:46:48.489136-04 | 2014-06-28 22:46:48.489136-04 | 2014-06-28 22:46:45.65891-04 | 192.111.11.111 | 37186
464875 | mydb | 5015 | 16387 | myuser | SELECT "reports".* FROM "reports" WHERE (("reports"."time" < '2014-06-28 13:30:42.000000' AND "reports"."unit_id" = 3192)) ORDER BY "reports"."id" DESC LIMIT 1 | f | 2014-06-28 22:46:48.421628-04 | 2014-06-28 22:46:48.421628-04 | 2014-06-28 22:46:45.674577-04 | 192.111.11.111 | 37187
464875 | mydb | 5016 | 16387 | myuser | SELECT "reports".* FROM "reports" WHERE (("reports"."time" < '2014-06-28 13:30:42.000000' AND "reports"."unit_id" = 3192)) ORDER BY "reports"."id" DESC LIMIT 1 | f | 2014-06-28 22:46:48.511434-04 | 2014-06-28 22:46:48.511434-04 | 2014-06-28 22:46:45.686831-04 | 192.111.11.111 | 37188
464875 | mydb | 5017 | 16387 | myuser | SELECT "reports".* FROM "reports" WHERE (("reports"."time" < '2014-06-28 13:30:42.000000' AND "reports"."unit_id" = 3192)) ORDER BY "reports"."id" DESC LIMIT 1 | f | 2014-06-28 22:46:48.45086-04 | 2014-06-28 22:46:48.45086-04 | 2014-06-28 22:46:45.698598-04 | 192.111.11.111 | 37189
464875 | mydb | 5018 | 16387 | myuser | SELECT "reports".* FROM "reports" WHERE (("reports"."time" < '2014-06-28 13:30:42.000000' AND "reports"."unit_id" = 3192)) ORDER BY "reports"."id" DESC LIMIT 1 | f | 2014-06-28 22:46:48.484459-04 | 2014-06-28 22:46:48.484459-04 | 2014-06-28 22:46:45.720091-04 | 192.111.11.111 | 37190
464875 | mydb | 5019 | 16387 | myuser | SELECT "reports".* FROM "reports" WHERE (("reports"."time" < '2014-06-28 13:30:42.000000' AND "reports"."unit_id" = 3192)) ORDER BY "reports"."id" DESC LIMIT 1 | f | 2014-06-28 22:46:48.456172-04 | 2014-06-28 22:46:48.456172-04 | 2014-06-28 22:46:45.734475-04 | 192.111.11.111 | 37191
464875 | mydb | 5020 | 16387 | myuser | SELECT "reports".* FROM "reports" WHERE (("reports"."time" < '2014-06-28 13:30:42.000000' AND "reports"."unit_id" = 3192)) ORDER BY "reports"."id" DESC LIMIT 1 | f | 2014-06-28 22:46:48.469764-04 | 2014-06-28 22:46:48.469764-04 | 2014-06-28 22:46:45.74667-04 | 192.111.11.111 | 37192
464875 | mydb | 5021 | 16387 | myuser | SELECT "reports".* FROM "reports" WHERE (("reports"."time" < '2014-06-28 13:30:42.000000' AND "reports"."unit_id" = 3192)) ORDER BY "reports"."id" DESC LIMIT 1 | f | 2014-06-28 22:46:48.487033-04 | 2014-06-28 22:46:48.487033-04 | 2014-06-28 22:46:45.759387-04 | 192.111.11.111 | 37193
464875 | mydb | 5022 | 16387 | myuser | SELECT "reports".* FROM "reports" WHERE (("reports"."time" < '2014-06-28 13:30:42.000000' AND "reports"."unit_id" = 3192)) ORDER BY "reports"."id" DESC LIMIT 1 | f | 2014-06-28 22:46:48.478195-04 | 2014-06-28 22:46:48.478195-04 | 2014-06-28 22:46:45.774068-04 | 192.111.11.111 | 37194
464875 | mydb | 5023 | 16387 | myuser | SELECT "reports".* FROM "reports" WHERE (("reports"."time" < '2014-06-28 13:30:42.000000' AND "reports"."unit_id" = 3192)) ORDER BY "reports"."id" DESC LIMIT 1 | f | 2014-06-28 22:46:48.3606-04 | 2014-06-28 22:46:48.3606-04 | 2014-06-28 22:46:45.786184-04 | 192.111.11.111 | 37195
464875 | mydb | 5024 | 16387 | myuser | SELECT "reports".* FROM "reports" WHERE (("reports"."time" < '2014-06-28 13:30:42.000000' AND "reports"."unit_id" = 3192)) ORDER BY "reports"."id" DESC LIMIT 1 | f | 2014-06-28 22:46:48.49322-04 | 2014-06-28 22:46:48.49322-04 | 2014-06-28 22:46:45.798569-04 | 192.111.11.111 | 37196
464875 | mydb | 5025 | 16387 | myuser | SELECT "reports".* FROM "reports" WHERE (("reports"."time" < '2014-06-28 13:30:42.000000' AND "reports"."unit_id" = 3192)) ORDER BY "reports"."id" DESC LIMIT 1 | f | 2014-06-28 22:46:48.482551-04 | 2014-06-28 22:46:48.482551-04 | 2014-06-28 22:46:45.813464-04 | 192.111.11.111 | 37197
464875 | mydb | 5026 | 16387 | myuser | SELECT "reports".* FROM "reports" WHERE (("reports"."time" < '2014-06-28 13:30:42.000000' AND "reports"."unit_id" = 3192)) ORDER BY "reports"."id" DESC LIMIT 1 | f | 2014-06-28 22:46:48.426778-04 | 2014-06-28 22:46:48.426778-04 | 2014-06-28 22:46:45.826912-04 | 192.111.11.111 | 37198
464875 | mydb | 5027 | 16387 | myuser | SELECT "reports".* FROM "reports" WHERE (("reports"."time" < '2014-06-28 13:30:42.000000' AND "reports"."unit_id" = 3192)) ORDER BY "reports"."id" DESC LIMIT 1 | f | 2014-06-28 22:46:48.465275-04 | 2014-06-28 22:46:48.465275-04 | 2014-06-28 22:46:45.841435-04 | 192.111.11.111 | 37199
464875 | mydb | 5028 | 16387 | myuser | SELECT "reports".* FROM "reports" WHERE (("reports"."time" < '2014-06-28 13:30:42.000000' AND "reports"."unit_id" = 3192)) ORDER BY "reports"."id" DESC LIMIT 1 | f | 2014-06-28 22:46:48.479509-04 | 2014-06-28 22:46:48.479509-04 | 2014-06-28 22:46:45.861571-04 | 192.111.11.111 | 37200
464875 | mydb | 5029 | 16387 | myuser | SELECT "reports".* FROM "reports" WHERE (("reports"."time" < '2014-06-28 13:30:42.000000' AND "reports"."unit_id" = 3192)) ORDER BY "reports"."id" DESC LIMIT 1 | f | 2014-06-28 22:46:48.441673-04 | 2014-06-28 22:46:48.441673-04 | 2014-06-28 22:46:45.875761-04 | 192.111.11.111 | 37201
464875 | mydb | 5030 | 16387 | myuser | SELECT "reports".* FROM "reports" WHERE (("reports"."time" < '2014-06-28 13:30:42.000000' AND "reports"."unit_id" = 3192)) ORDER BY "reports"."id" DESC LIMIT 1 | f | 2014-06-28 22:46:48.495664-04 | 2014-06-28 22:46:48.495664-04 | 2014-06-28 22:46:45.889283-04 | 192.111.11.111 | 37202
464875 | mydb | 5031 | 16387 | myuser | SELECT "reports".* FROM "reports" WHERE (("reports"."time" < '2014-06-28 13:30:42.000000' AND "reports"."unit_id" = 3192)) ORDER BY "reports"."id" DESC LIMIT 1 | f | 2014-06-28 22:46:48.455382-04 | 2014-06-28 22:46:48.455382-04 | 2014-06-28 22:46:45.902743-04 | 192.111.11.111 | 37203
464875 | mydb | 5032 | 16387 | myuser | SELECT "reports".* FROM "reports" WHERE (("reports"."time" < '2014-06-28 13:30:42.000000' AND "reports"."unit_id" = 3192)) ORDER BY "reports"."id" DESC LIMIT 1 | f | 2014-06-28 22:46:48.487286-04 | 2014-06-28 22:46:48.487286-04 | 2014-06-28 22:46:45.915018-04 | 192.111.11.111 | 37204
464875 | mydb | 5033 | 16387 | myuser | SELECT "reports".* FROM "reports" WHERE (("reports"."time" < '2014-06-28 13:30:42.000000' AND "reports"."unit_id" = 3192)) ORDER BY "reports"."id" DESC LIMIT 1 | f | 2014-06-28 22:46:48.409053-04 | 2014-06-28 22:46:48.409053-04 | 2014-06-28 22:46:45.927487-04 | 192.111.11.111 | 37205
464875 | mydb | 5034 | 16387 | myuser | SELECT "reports".* FROM "reports" WHERE (("reports"."time" < '2014-06-28 13:30:42.000000' AND "reports"."unit_id" = 3192)) ORDER BY "reports"."id" DESC LIMIT 1 | f | 2014-06-28 22:47:00.025495-04 | 2014-06-28 22:47:00.025495-04 | 2014-06-28 22:46:45.941991-04 | 192.111.11.111 | 37206
464875 | mydb | 5035 | 16387 | myuser | SELECT "reports".* FROM "reports" WHERE (("reports"."time" < '2014-06-28 13:30:42.000000' AND "reports"."unit_id" = 3192)) ORDER BY "reports"."id" DESC LIMIT 1 | f | 2014-06-28 22:47:10.276873-04 | 2014-06-28 22:47:10.276873-04 | 2014-06-28 22:46:45.952872-04 | 192.111.11.111 | 37207
464875 | mydb | 5036 | 16387 | myuser | SELECT "reports".* FROM "reports" WHERE (("reports"."time" < '2014-06-28 13:30:42.000000' AND "reports"."unit_id" = 3192)) ORDER BY "reports"."id" DESC LIMIT 1 | f | 2014-06-28 22:46:48.441936-04 | 2014-06-28 22:46:48.441936-04 | 2014-06-28 22:46:46.185738-04 | 192.111.11.111 | 37208
464875 | mydb | 5037 | 16387 | myuser | SELECT "reports".* FROM "reports" WHERE (("reports"."time" < '2014-06-28 13:30:42.000000' AND "reports"."unit_id" = 3192)) ORDER BY "reports"."id" DESC LIMIT 1 | f | 2014-06-28 22:47:10.292393-04 | 2014-06-28 22:47:10.292393-04 | 2014-06-28 22:46:46.199571-04 | 192.111.11.111 | 37209
464875 | mydb | 5038 | 16387 | myuser | SELECT "reports".* FROM "reports" WHERE (("reports"."time" < '2014-06-28 13:30:42.000000' AND "reports"."unit_id" = 3192)) ORDER BY "reports"."id" DESC LIMIT 1 | f | 2014-06-28 22:46:59.385806-04 | 2014-06-28 22:46:59.385806-04 | 2014-06-28 22:46:46.21637-04 | 192.111.11.111 | 37210
464875 | mydb | 5039 | 16387 | myuser | SELECT "reports".* FROM "reports" WHERE (("reports"."time" < '2014-06-28 13:30:42.000000' AND "reports"."unit_id" = 3192)) ORDER BY "reports"."id" DESC LIMIT 1 | f | 2014-06-28 22:46:48.49241-04 | 2014-06-28 22:46:48.49241-04 | 2014-06-28 22:46:46.420784-04 | 192.111.11.111 | 37214
464875 | mydb | 5044 | 16387 | myuser | SELECT "reports".* FROM "reports" WHERE (("reports"."time" < '2014-06-28 13:30:42.000000' AND "reports"."unit_id" = 3192)) ORDER BY "reports"."id" DESC LIMIT 1 | f | 2014-06-28 22:47:00.205178-04 | 2014-06-28 22:47:00.205178-04 | 2014-06-28 22:46:50.334982-04 | 192.111.11.111 | 37326
464875 | mydb | 5045 | 16387 | myuser | SELECT "reports".* FROM "reports" WHERE (("reports"."time" < '2014-06-28 13:30:42.000000' AND "reports"."unit_id" = 3192)) ORDER BY "reports"."id" DESC LIMIT 1 | f | 2014-06-28 22:47:10.367944-04 | 2014-06-28 22:47:10.367944-04 | 2014-06-28 22:46:50.349629-04 | 192.111.11.111 | 37327
464875 | mydb | 5046 | 16387 | myuser | SELECT "reports".* FROM "reports" WHERE (("reports"."time" < '2014-06-28 13:30:42.000000' AND "reports"."unit_id" = 3192)) ORDER BY "reports"."id" DESC LIMIT 1 | f | 2014-06-28 22:46:59.49881-04 | 2014-06-28 22:46:59.49881-04 | 2014-06-28 22:46:50.576983-04 | 192.111.11.111 | 37328
464875 | mydb | 5047 | 16387 | myuser | SELECT "reports".* FROM "reports" WHERE (("reports"."time" < '2014-06-28 13:30:42.000000' AND "reports"."unit_id" = 3192)) ORDER BY "reports"."id" DESC LIMIT 1 | f | 2014-06-28 22:47:00.229422-04 | 2014-06-28 22:47:00.229422-04 | 2014-06-28 22:46:50.980634-04 | 192.111.11.111 | 37339
464875 | mydb | 5048 | 16387 | myuser | SELECT "reports".* FROM "reports" WHERE (("reports"."time" < '2014-06-28 13:30:42.000000' AND "reports"."unit_id" = 3192)) ORDER BY "reports"."id" DESC LIMIT 1 | f | 2014-06-28 22:47:40.429174-04 | 2014-06-28 22:47:40.429174-04 | 2014-06-28 22:46:51.227864-04 | 192.111.11.111 | 37347
464875 | mydb | 5049 | 16387 | myuser | SELECT "reports".* FROM "reports" WHERE (("reports"."time" < '2014-06-28 13:30:42.000000' AND "reports"."unit_id" = 3192)) ORDER BY "reports"."id" DESC LIMIT 1 | f | 2014-06-28 22:46:59.491413-04 | 2014-06-28 22:46:59.491413-04 | 2014-06-28 22:46:51.586095-04 | 192.111.11.111 | 37353
464875 | mydb | 5052 | 16387 | myuser | SELECT "reports".* FROM "reports" WHERE (("reports"."time" < '2014-06-28 13:30:42.000000' AND "reports"."unit_id" = 3192)) ORDER BY "reports"."id" DESC LIMIT 1 | f | 2014-06-28 22:46:59.584386-04 | 2014-06-28 22:46:59.584386-04 | 2014-06-28 22:46:51.85682-04 | 192.111.11.111 | 37360
464875 | mydb | 5053 | 16387 | myuser | SELECT "reports".* FROM "reports" WHERE (("reports"."time" < '2014-06-28 13:30:42.000000' AND "reports"."unit_id" = 3192)) ORDER BY "reports"."id" DESC LIMIT 1 | f | 2014-06-28 22:46:59.506483-04 | 2014-06-28 22:46:59.506483-04 | 2014-06-28 22:46:52.083316-04 | 192.111.11.111 | 37367
464875 | mydb | 8958 | 16387 | myuser | <IDLE> | f | | 2014-06-29 00:05:06.735249-04 | 2014-06-27 16:34:39.307312-04 | 192.111.11.111 | 52759
464875 | mydb | 5054 | 16387 | myuser | SELECT "reports".* FROM "reports" WHERE (("reports"."time" < '2014-06-28 13:30:42.000000' AND "reports"."unit_id" = 3192)) ORDER BY "reports"."id" DESC LIMIT 1 | f | 2014-06-28 22:46:59.52573-04 | 2014-06-28 22:46:59.52573-04 | 2014-06-28 22:46:52.285867-04 | 192.111.11.111 | 37371
464875 | mydb | 5055 | 16387 | myuser | SELECT "reports".* FROM "reports" WHERE (("reports"."time" < '2014-06-28 13:30:42.000000' AND "reports"."unit_id" = 3192)) ORDER BY "reports"."id" DESC LIMIT 1 | f | 2014-06-28 22:46:59.530804-04 | 2014-06-28 22:46:59.530804-04 | 2014-06-28 22:46:52.303562-04 | 192.111.11.111 | 37372
464875 | mydb | 5056 | 16387 | myuser | SELECT "reports".* FROM "reports" WHERE (("reports"."time" < '2014-06-28 13:30:42.000000' AND "reports"."unit_id" = 3192)) ORDER BY "reports"."id" DESC LIMIT 1 | f | 2014-06-28 22:46:59.572198-04 | 2014-06-28 22:46:59.572198-04 | 2014-06-28 22:46:52.31447-04 | 192.111.11.111 | 37373
464875 | mydb | 5057 | 16387 | myuser | SELECT "reports".* FROM "reports" WHERE (("reports"."time" < '2014-06-28 13:30:42.000000' AND "reports"."unit_id" = 3192)) ORDER BY "reports"."id" DESC LIMIT 1 | f | 2014-06-28 22:46:59.872037-04 | 2014-06-28 22:46:59.872037-04 | 2014-06-28 22:46:52.323721-04 | 192.111.11.111 | 37374
464875 | mydb | 5058 | 16387 | myuser | SELECT "reports".* FROM "reports" WHERE (("reports"."time" < '2014-06-28 13:30:42.000000' AND "reports"."unit_id" = 3192)) ORDER BY "reports"."id" DESC LIMIT 1 | f | 2014-06-28 22:46:59.961803-04 | 2014-06-28 22:46:59.961803-04 | 2014-06-28 22:46:52.334238-04 | 192.111.11.111 | 37375
464875 | mydb | 5059 | 16387 | myuser | SELECT "reports".* FROM "reports" WHERE (("reports"."time" < '2014-06-28 13:30:42.000000' AND "reports"."unit_id" = 3192)) ORDER BY "reports"."id" DESC LIMIT 1 | f | 2014-06-28 22:46:59.53713-04 | 2014-06-28 22:46:59.53713-04 | 2014-06-28 22:46:52.347227-04 | 192.111.11.111 | 37376
464875 | mydb | 5060 | 16387 | myuser | SELECT "reports".* FROM "reports" WHERE (("reports"."time" < '2014-06-28 13:30:42.000000' AND "reports"."unit_id" = 3192)) ORDER BY "reports"."id" DESC LIMIT 1 | f | 2014-06-28 22:47:00.208948-04 | 2014-06-28 22:47:00.208948-04 | 2014-06-28 22:46:52.360008-04 | 192.111.11.111 | 37377
464875 | mydb | 5061 | 16387 | myuser | SELECT "reports".* FROM "reports" WHERE (("reports"."time" < '2014-06-28 13:30:42.000000' AND "reports"."unit_id" = 3192)) ORDER BY "reports"."id" DESC LIMIT 1 | f | 2014-06-28 22:46:59.938983-04 | 2014-06-28 22:46:59.938983-04 | 2014-06-28 22:46:52.369496-04 | 192.111.11.111 | 37378