-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
🐛 Bug: Knex: Timeout acquiring a connection. The pool is probably full. Are you missing a .transacting(trx) call? After upgrade to 0.204.1 (and .2) #7770
Comments
We made a fix in following PR #7777. Could you kindly verify it by using following PR docker build?
|
That was quick! |
It works! The error is gone, and I can start NocoDB. For some reason, I didn't get my config back. I guess this is because I test with Docker but my previously working setup does not use Docker. I mapped the directory containing my noco.db to /usr/app/data in Docker but to no avail. At least, the error is gone. |
Update for whom it may concern: The latest version 0.204.4 starts fine outside docker (that is, with my standard setup). The error is gone. However, the config remains lost. I therefore conclude that the upgrade process has erased all my config (views etc) from NocoDB's meta database. |
hey @christophberger : had you set NC_DB env variable and if not had you mounted the volume ? before and after this process. If not, the metadata was stored in SQLite and is no longer present. Hope that clarifies. |
@o1lab Thanks for the reply.
Not sure if I understand. Why is it no longer present? |
Ok, thanks for the reply. We would like to debug on what is happening here. @pranavxc will come back on this as he has more context (he is off sick today). |
@christophberger If possible can you share the docker command or docker-compose with the volume mounting arg which you tried? |
@pranavxc Sure: nerdctl run -d --name newsdb \
-v /<long_path_omitted>/newsdb/:/usr/app/data/ \
-p 4040:8080 \
nocodb/nocodb:latest
|
Are you connecting sqlite as external source as well ? |
Yes, I connect a sqlite DB as external source. |
That file you should keep in the same path inside docker ( whatever path you had given while creating the connection) |
To clarify, what do you mean by connecting as external source? The data DB I mentioned earlier is an external source in a certain way. Both DBs sit in the directory that is mounted at |
And in your case all the bases, users, table, views,… are missing or just the data from these views? If possible can you do a screen record and share, that way it’s easier to understand the real problem you are facing. |
To make the external source work you have to copy the file to the exact same path(within container) where it currently present. |
It is. I did not move it. |
When you added external source under a base you may provided a path to your sqlite file and within the newly created docker container it will check that path for the external db file since the path is stored in the metadb as you inputed initially. And from the error it’s clear that the file is not exist in that path to confirm you can check for any backend error log in docker as well. |
Ok, sorry, I misunderstood your previous comment. In both cases, I configured the path to the external DB as |
https://www.sqlite.org/rescode.html#cantopen Ok then it looks like some permission error, can you check the docker container logs and share it if there any error? |
Sure. When I attempt to access a table, the docker logs show these errors:
Those errors aren't in the log if I use the other noco.db. |
Confirm the sqlite file path under Datasources tab. Screen.Recording.2024-03-12.at.12.00.57.PM.mov |
I use Note that the same path works with the newer version of noco.db (the one that has no metadata), all else being unchanged. I already tried I suspect that the problem is rooted somewhere inside the older version of noco.db. But I have no idea where to look. |
The error is happening with Sqlite which couldn't able to open the file and the reason could be any of the following,
You can get inside the container and verify that the file exist or not, verify read permission and try to connect it from external tool to verify sqlite file is not corrupted. If the path shown in edit source is For more info you can check this - https://www.sqlite.org/rescode.html#cantopen |
A new test brought new insights. Currently, my NocoDB instance runs with the older version of noco.db, the one with the base that has all the views, filters etc. but cannot open the external DB. I just created a new base in this instance, with the external DB as datasource. The new base can open the database without any issues. So the problem is 100% a problem of metadata in the base that fails to open the external db. Which of its metadata does a base use for opening and reading an external database? Is there any chance that I can somehow repair that data in a DB app like DBeaver? It took me a while to set up all the views, filters, sorting, column types, etc., and I don't look forward to doing all that again. |
Let's connect over a call, you can ping me in Discord https://discord.gg/5RgZmkW ( user - |
Thank you, @pranavxc, for resolving the issue on the call! I never would have been able to track that down, let alone fix, on my own. For interested readers, the problem was caused by the base's config that pointed to an outdated path. This part of the config is inaccessible in the UI, though; it's an internal config setting. After fixing the path, the base works again! 🎉 |
Please confirm if bug report does NOT exist already ?
Steps to reproduce ?
Start
nocodb
after upgrading to v0.204.1 or v0.204.2, respectively.Result:
Full output:
Desired Behavior
nocodb
should start the server.Project Details
NocoDB used as docker : false
NocoDB version : 0.204.1 and 0.204.2
Database used in NC_DB URL : SQLite
Project was created by clicking : New Project by connecting to external database
Database on which spreadsheet is created : SQLite
OS on which NocoDB is running : macOS
Node.js version if running as node : v21.6.2
Database version : n/a
Attachments
No response
The text was updated successfully, but these errors were encountered: