Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Why doesn the last connection die off when I set connections=0 and maxconnections to some larger number and let SQL Relay go idle for a long time?

connection die larger let Relay sql
0
10 Posted

Why doesn the last connection die off when I set connections=0 and maxconnections to some larger number and let SQL Relay go idle for a long time?

0
10

When SQL Relay first starts up, since no connections are started, no connections are registered with the listener. Clients connect, connections fire up to handle them, clients disconnect, the connections time out and die. However, one of the connections will still remain registered with the listener as an “available connection”. This connection cannot die off. It’s really, really complicated why. I tried lots of approaches and couldn’t find one that didn’t have a fundamental problem. Basically, here’s the code: listener: acquireExclusiveAccessToSharedMemoryAmongListenerProcesses(); waitForConnectionToSignalUsToRead(); readRegistration(); signalConnectionThatWeHaveRead(); releaseEclusiveAccessToSharedMemoryAmongListenerProcesses(); connection: acquireExclusiveAccessToSharedMemoryAmongConnectionProcesses(); writeRegistration(); signalListenerToRead(); waitForListenerToSignalUsThatItHasRead(); releaseEclusiveAccessToSharedMemoryAmongConnectionProcesses(); If the connection dies between si

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123