Skript-db creating too many SQL connections #19

Closed
opened 2022-06-26 18:39:09 +00:00 by Govindas · 9 comments
Owner

One user reported that skript-db created 150 connections in 5 minutes that stay without closing. There may be a leak?

In addition to that, we should add configuration option for max connections at any given time.

One user reported that skript-db created 150 connections in 5 minutes that stay without closing. There may be a leak? In addition to that, we should add configuration option for max connections at any given time.

yea same for me.
i got a lot of connections, so that my website doesn't work anymore..

maybe it's because i open multiple databases at a time

yea same for me. i got a lot of connections, so that my website doesn't work anymore.. maybe it's because i open multiple databases at a time
Author
Owner

yea same for me.
i got a lot of connections, so that my website doesn't work anymore..

maybe it's because i open multiple databases at a time

Could you share more details on your setup? I cannot reproduce this issue on my own network, so I need your sql server configuration, your queries and how often they are done.

Usually increasing max connections limit in your sql server configuration should help.

Also make sure you have not saved sql connections into persistent variables (those would end up starting on server startup)

> yea same for me. > i got a lot of connections, so that my website doesn't work anymore.. > > maybe it's because i open multiple databases at a time Could you share more details on your setup? I cannot reproduce this issue on my own network, so I need your sql server configuration, your queries and how often they are done. Usually increasing max connections limit in your sql server configuration should help. Also make sure you have not saved sql connections into persistent variables (those would end up starting on server startup)

which variables should I use then? How should they look?
{_sql} wouldn't work in other skripts right?

which variables should I use then? How should they look? {_sql} wouldn't work in other skripts right?
Author
Owner

{-variables}

you can enable them with (?!-).* variable pattern in config.SK database settings

{-variables} you can enable them with (?!-).* variable pattern in config.SK database settings

doesn't change anything..

there are just a lot of sleep connections. If you kill them, the plugin sends warnings that is has to recreate them

doesn't change anything.. there are just a lot of sleep connections. If you kill them, the plugin sends warnings that is has to recreate them
Author
Owner

how much is a lot?

how much is a lot?

always the max connections limit
i think the connections get saved somewhere else and then always reconnected or they just don't get right closed.

always the max connections limit i think the connections get saved somewhere else and then always reconnected or they just don't get right closed.
Author
Owner

variables.CSV file would be the only somewhere else place it may save to

variables.CSV file would be the only somewhere else place it may save to
Author
Owner

I finally took time to debug this issue and found the cause to be that I removed thread-pool-size config option many updates ago, I have now re-added it in skript-db 1.3.9 and it should be fixed. (Release soon)

I finally took time to debug this issue and found the cause to be that I removed thread-pool-size config option many updates ago, I have now re-added it in skript-db 1.3.9 and it should be fixed. (Release soon)
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Limework/skript-db#19
No description provided.