thinktecture/relayserver

On very high load a slow db could lead to connection pool starvation

gingters opened this issue · 0 comments

On very high load a lot of ACKs are received. Every ACK leads to the update of the LastActivity field of the requested link in the DB.

This can lead to hundreds of db updates per second.

Under certain circumstances when only one link is requested a lot, this can lead to the DB serializing all the writes to the same row.

When the DB is slow, this could lead to an ever growing list of EF update queries waiting to be processed by the database. At some point the connection pool has only connections that wait for the update, and when the max connection pool size is exhausted this will lead to timeout errors when trying to fetch another connection from the exhausted pool.