diff options
author | Frederick Muriuki Muriithi | 2022-04-12 11:51:53 +0300 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2022-04-12 11:52:25 +0300 |
commit | 9fa69a48e3faf7905d89479e26d12f7abe6d8fb4 (patch) | |
tree | be37af546c67ebf2c6fd319f621f121935e760af /issues | |
parent | 5b1ea627abb0fee28026f9ca9c0d17c7be527884 (diff) | |
download | gn-gemtext-9fa69a48e3faf7905d89479e26d12f7abe6d8fb4.tar.gz |
Update issue with some findings
Diffstat (limited to 'issues')
-rw-r--r-- | issues/sql-too-many-connections.gmi | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/issues/sql-too-many-connections.gmi b/issues/sql-too-many-connections.gmi index e80beaa..f8db41b 100644 --- a/issues/sql-too-many-connections.gmi +++ b/issues/sql-too-many-connections.gmi @@ -16,3 +16,12 @@ See the strack trace present in this page: => https://ci.genenetwork.org/jobs/genenetwork2/214 + + +### Debug notes + +The function decorated with `@app.before_requests` is called before every request, even ones retrieving static files like CSS and JS files. This executes the `sqlalchemy.create_engine(...)' statement many times for each page. + +I started by checking whether the request is to a *static* or *js* endpoint, and if it is, we do not bother trying to create the engine in that case. + +This does not resolve the issue per-se, but it does reduce a lot of the noise when logging. |