Error during table cpzone1 creation. Error message: database is locked
-
Hi
Gertjan,
I have implemented the changes suggested by you, to see results I need to check it for atleast 1 day. I ll update about the result.
Hope it ll work
Regards
-
Good.
Do you have a tool like this : https://www.test-domaine.fr/munin/brit-hotel-fumel.net/pfsense.brit-hotel-fumel.net/portalusers.html ? (my real time captive portal users stats).
Keep my fingers crossed.
-
Hi,
Nope, I don't have any tool like this, I check users and bandwidth graphs on RRd. What more functionalities does your graph tool give than RRD?
Usage increased up to 14% and users currently logged in CP are 1520.
copied from pfsense
/var/run (ufs in RAM): 14% of 3.4MMax users expected to log in CP are up to 3000, so if it increases to 40% then I think there won't be any problem.
Good thing is I myself have faced this error of database is locked till yesterday, but after changes, it doesn't occur before me, but updates from other users are still pending…
Regards
-
Nope, I don't have any tool like this, I check users and bandwidth graphs on RRd. What more functionalities does your graph tool give than RRD?
I wanted to have a tool that monitors my servers (on the Internet). I added also some graphs coming from pfSense, which isn't "on the net" of course.
It helps me to see from everywhere 'on the planet' how things are going without logging in remotely.
If I was responsible for the access of several thousand of users, I would really consider adding such tools. It could run on a 'couple of $' VPS.My pfsense setup https://www.test-domaine.fr/munin/brit-hotel-fumel.net/pfsense.brit-hotel-fumel.net/index.html (and look one level up, you could see all my servers).
Good thing is I myself have faced this error of database is locked till yesterday, but after changes, it doesn't occur before me, but updates from other users are still pending…
So far, so good :)
If users have logging problems related to the errors you showed above, then log-lines present in pfsense WILL tell you even before they come to you.Keep checking the size of the RAM disk - when this one goes full, pfsense WILL panic. (but I guess it won't happen).
-
Check out this https://forum.pfsense.org/index.php?topic=103732.0 (it concerns a pfsense Beta 2.3 but the part where the errors come from looks the same / didn't change … )
Time for a :( I guess ....
Probably we are on the wrong track.=> Still no errors anymore ?
Btw : your are using a VM or is your pfsense running on a native device ?
-
Hi,
Gertjan,
There are no database errors reported from anywhere in the network till
I think that changes have worked, I ll keep checking it for few more days.
Thank you,
I have read that thread you mentioned, but those errors might be due to vmware.
I am not using vmware. Pfsense is running on native hardware.
I am facing another CP error though, this error has not started after the changes but it was already happening.
Error is CP service stops and then CP page does not pop up.
CP service does stop in 48 hours. I have also seen sometimes squidguard service does stop but it starts automatically but CP service does not start automatically, I manually have to restart. -
….
Error is CP service stops and then CP page does not pop up.
CP service does stop in 48 hours. I have also seen sometimes squidguard service does stop but it starts automatically but CP service does not start automatically, I manually have to restart.Before (2.2.5 ?) squid and Captive portal was impossible.
Now : I don't know (I don't know why I should use Squid …)
My Captive Portail never dies.All I know is : Squid + Captive portal …. unstable, or worse.
-
Hi,
I am using Pfsense at 2 more places and at every place no pf users are 1200-1400. I have never faced any database locked error or CP service stopped error and there are always 200-400 concurrent users 24/7.
And there also I am using squid2.7 + squid-guard and CP authentication and using 2.2.5 version, but started from version 2.0.1 and never faced any such difficulties .
Regards
-
This is the root issue, we're working on it.
https://redmine.pfsense.org/issues/5622 -
Hi,
Hope to see a solution soon.
Thanks and regards
-
"Soon" might be right now : https://forum.pfsense.org/index.php?topic=103732.new;topicseen#new
-
ok, I got it.
So should I undo the earlier changes made in /var/run ?
Regards
-
So should I undo the earlier changes made in /var/run ?
Absolutely, yes. That was never a good idea. Though you can just wait until a fixed snapshot's available and upgrade to it to make sure you're back to a sane state.
I just committed what should be a good fix for the issue here. 2.2.6 snapshot builders just restarted, we'll have a new snapshot in a couple hours that'll hopefully fix this.
-
Those who are seeing this issue, please try the newest available 2.2.6 snapshot and report back. It looks to be fixed, but I would like additional confirmation.
64 bit
https://snapshots.pfsense.org/FreeBSD_releng/10.1/amd64/pfSense_RELENG_2_2/updates/?C=M;O=D32 bit
https://snapshots.pfsense.org/FreeBSD_releng/10.1/i386/pfSense_RELENG_2_2/updates/?C=M;O=D -
Ok,
I,ll apply the 2.2.6-64bit snapshot and report back.
Thanks and Regards,
-
Sorry for late reply. As I cant afford to down server even for 15 mins for last 4 days for some urgent time bound jobs.
I just upgraded to 2.2.6 release.
AND again I just saw the following error at CP login page, as this is the best time to check this error as lots of hit for CP authentication are coming, what I do, I keep on refreshing the CP authentication page, I do not enter my login id and password. So after 2-3 refreshes I am able to see this error on my system. So anywhere else in the network, other people would also be seeing this error.
Warning: SQLite3::exec(): database is locked in /etc/inc/captiveportal.inc on line 2045 Warning: SQLite3::query(): Unable to prepare statement: 5, database is locked in /etc/inc/captiveportal.inc on line 2057
I haven't seen this error in last 4-5 days when I implemented changes suggest by Gertjan.
I am reverting back to Gertjan suggested changes for the time being…
Regards
Regards & Thanks
-
Warning: SQLite3::exec(): database is locked in /etc/inc/captiveportal.inc on line 2045
Line 2045 : https://github.com/pfsense/pfsense/blob/RELENG_2_2/etc/inc/captiveportal.inc#L2045 - a simple log line
@amitaussie:Warning: SQLite3::query(): Unable to prepare statement: 5, database is locked in /etc/inc/captiveportal.inc on line 2057
Line 2057 : https://github.com/pfsense/pfsense/blob/RELENG_2_2/etc/inc/captiveportal.inc#L2057 == empty line ??,
Your file /etc/inc/captiveportal.inc contains the edits that puts the database file on RAM (what I suggested in the beginning), but this doesn't explain why your version of /etc/inc/captiveportal.inc is so much different as the original : https://github.com/pfsense/pfsense/blob/RELENG_2_2/etc/inc/captiveportal.inc
The database error should happen around lines 1300 - 1400 ….
You're NOT using an original pfsense setup, it has been patched with something else ?? -
Hi,
Gertjan!
My captiveportal.inc is different as I am using a file which is patched for manual logout as mentioned in this post of yours
https://forum.pfsense.org/index.php?topic=77143.15But after making changes in /var/run database error is certainly not appearing and everything is working ok.
Regards
-
Hi
Gertjan!
I am not able to find changes you suggested for /var/run.
Can you please re-send the changes as these were helping.
Regards -
I am not able to find changes you suggested for /var/run.
Can you please re-send the changes as these were helping.
They should be on the forum - I didn't remove anything.
It was a question of changing the the 2 places where the data base was created.But, be careful : read this https://forum.pfsense.org/index.php?topic=103707.msg580857#msg580857 (post above).
I don't know why it is a bad idea, but if cmb says so, I will not discus that (although I do want to the the 'why' part ;)).