operepo / ope

Open Prison Education project - Code and scripts to enable offline docker services and offline laptop syncing for inmate education
MIT License
15 stars 6 forks source link

Canvas 500 errors - database connection pool too small #102

Closed frankyrumple closed 2 years ago

frankyrumple commented 2 years ago

Thanks to Daniel for helping track this down.

When too many hits are coming in to the canvas server, you get some 500 errors due to database connection issues. The connection pool was set too low (15) and needs to be raised.

When having 15+ laptops syncing against canvas, there can easily be 1000's of web requests per minute per laptop which overwhealms the small conneciton pool.

Rebuild of Canvas and Postgresql required to fix - need to adjust database.ytml template with higher pool (change from 15 -> 150) and adjust Postgresql config to accept more connections (change from 100 -> 300)

frankyrumple commented 2 years ago

Released updated canvas with larger database pool. Also updated canvas to up request throttle from 600 to 100000.