Skip to content

Loading…

Startup with many sites uses many db connections #336

Closed
mworrell opened this Issue · 9 comments

3 participants

@mworrell
Zotonic member

When starting zotonic we are using multiple db connections per site.

When there are many sites this may exhaust the available database connections.

We need to start sites slower, and less in parallel.

This also needs to be backported to zotonic 0.8.

@mworrell mworrell was assigned
@mworrell
Zotonic member

I think we can use the jobs application for this.

Where we can define a maximum number of parallel jobs when starting.

@mmzeeman
Zotonic member

Hmm, maybe it is time to speed up the work on the new db layer. This uses poolboy, which you can configure it how many connections open at startup with size and max_overflow parameters.

@arjan
Zotonic member

@mmzeeman how is it going with the new db layer?

@mmzeeman
Zotonic member

Didn"t touch it in a while. Busy. It sure would take a lot away a lot of installation hassles.

@arjan
Zotonic member

Do you have a branch somewhere? I might have time the coming weeks to take a look at this.
Really would like multi-db support... :)

@mmzeeman
Zotonic member
@mworrell
Zotonic member

I can try to give a shot at this issue.

It is a kind of generic problem where we need to be able to recycle connections between sites when we are "starving".

@mworrell
Zotonic member

Do we have a trace/error-log entry of this issue?

@mworrell
Zotonic member

This should be fixed by refactoring the OTP supervision tree and the site-startup process.

Closing for now.

@mworrell mworrell closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.