Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

poolMaxResources must not be smaller than numStripes error after upgrading to IHP 1.3 #1959

Closed
liammcdermott opened this issue May 9, 2024 · 3 comments
Labels

Comments

@liammcdermott
Copy link
Contributor

After upgrading IHP for my project, according to these instructions, then starting the dev server using devenv up, I get this error:

IHP> poolMaxResources must not be smaller than numStripes
CallStack (from HasCallStack):
error, called at src/Data/Pool/Internal.hs:121:5 in resource-pool-0.4.0.0-FBHUJnlWdPR45ATVkIfo6z:Data.Pool.Internal

image

The project is something I've only just started on, so I doubt it's due to some setting I've changed. Is there something else we need to do when upgrading?

@mpscholten
Copy link
Member

You found a bug 👍 This is an error coming from the database pool. We've changed how the database pool is configured a while ago.

By default IHP uses up to 20 db connections. The numStripes value is set to the number of CPUs on your computer by the database pool library by default. So likely you have a lot of CPUs? Or atleast getNumCapabilities > 20.

As a workaround you can put something like option (DBPoolMaxConnections 100) into your Config.hs to increase IHP's poolMaxResources

@liammcdermott
Copy link
Contributor Author

Strange way to shame me for having 32 cores, but okay. 😀 Anyway, I can confirm that putting:

option (DBPoolMaxConnections 100)

in Config.hs works around the issue. I'm just updating to the main branch, so I can test the fix in #1960 (wow, that was fast!)

@liammcdermott
Copy link
Contributor Author

Can confirm: #1960 fixes this issue for me. Thank you for the quick fix, @mpscholten!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants