ScientiaFelis / sebmsR

Swedish Butterflies - tools and apps
GNU Affero General Public License v3.0
2 stars 0 forks source link

Deconnect to sql-server after a number of queries #46

Closed ScientiaFelis closed 5 months ago

ScientiaFelis commented 5 months ago

The functions can no longer connect to server after having run a number of functions. Through error: FATAL: sorry, too many clients already

larspett commented 5 months ago

since it is our server that we administer ourselves, this is a weird error

larspett commented 5 months ago

was this when we both used test62 in DEV?

ScientiaFelis commented 5 months ago

I think this is because I removed sebms_connect() from when the package loaded, where it saved a sebms_pool in an environment. That lead to that each time I was running a function it was creating a pool. I do not know exactly how these functions work but apparently after a while it was to many 'clients' connecting.

Now it seems to work.