So, the reason is that we have very long transaction (for the whole graph serialization) where statements like:
UPDATE nodes SET primary_tags=ARRAY['controller'] WHERE nodes.id = 1
block simultaneous updates of node timestamps by nailgun agent:
UPDATE nodes SET timestamp='2016-12-09T05:54:08.388083'::timestamp WHERE nodes.id = 1
At some point this results in all web server workers being blocked waiting for DB to complete the transaction.
So, the reason is that we have very long transaction (for the whole graph serialization) where statements like:
UPDATE nodes SET primary_ tags=ARRAY[ 'controller' ] WHERE nodes.id = 1
block simultaneous updates of node timestamps by nailgun agent:
UPDATE nodes SET timestamp= '2016-12- 09T05:54: 08.388083' ::timestamp WHERE nodes.id = 1
At some point this results in all web server workers being blocked waiting for DB to complete the transaction.