psa_car_controller icon indicating copy to clipboard operation
psa_car_controller copied to clipboard

sqlite3.OperationalError: database is locked

Open ai91 opened this issue 8 months ago • 14 comments

Vehicle added and configured. Running in docker. Polling every minute with from_cache parameter. Getting vehicle state updated, etc. But from time to time it falls into state when every ~2 minutes spams in activity.log with following error:

2025-04-22 05:39:16,084 :: INFO :: 172.18.0.3 - - [22/Apr/2025 05:39:16] "GET /get_vehicleinfo/VR3K**********946?from_cache=1 HTTP/1.1" 200 -
2025-04-22 05:39:50,532 :: ERROR :: refresh_vehicle_info: 
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/dist-packages/psa_car_controller/psacc/application/psa_client.py", line 128, in __refresh_vehicle_info
    self.get_vehicle_info(car.vin)
  File "/usr/local/lib/python3.11/dist-packages/psa_car_controller/psacc/application/psa_client.py", line 111, in get_vehicle_info
    self.record_info(car)
  File "/usr/local/lib/python3.11/dist-packages/psa_car_controller/psacc/application/psa_client.py", line 216, in record_info
    Database.record_battery_soh(car.vin, charge_date, soh)
  File "/usr/local/lib/python3.11/dist-packages/psa_car_controller/psacc/repository/db.py", line 285, in record_battery_soh
    conn.execute("INSERT INTO battery_soh(date, VIN, level) VALUES(?,?,?)", (date, vin, level))
sqlite3.OperationalError: database is locked
2025-04-22 05:40:06,149 :: INFO :: 172.18.0.2 - - [22/Apr/2025 05:40:06] "GET /get_vehicleinfo/VR3K**********946?from_cache=1 HTTP/1.1" 200 -
2025-04-22 05:40:16,103 :: INFO :: 172.18.0.3 - - [22/Apr/2025 05:40:16] "GET /get_vehicleinfo/VR3K**********946?from_cache=1 HTTP/1.1" 200 -
2025-04-22 05:40:51,191 :: WARNING :: Disconnected with result code 7
2025-04-22 05:40:51,192 :: WARNING :: The connection was lost.
2025-04-22 05:41:16,134 :: INFO :: 172.18.0.3 - - [22/Apr/2025 05:41:16] "GET /get_vehicleinfo/VR3K**********946?from_cache=1 HTTP/1.1" 200 -
2025-04-22 05:42:06,216 :: INFO :: 172.18.0.2 - - [22/Apr/2025 05:42:06] "GET /get_vehicleinfo/VR3K**********946?from_cache=1 HTTP/1.1" 200 -
2025-04-22 05:42:16,149 :: INFO :: 172.18.0.3 - - [22/Apr/2025 05:42:16] "GET /get_vehicleinfo/VR3K**********946?from_cache=1 HTTP/1.1" 200 -
2025-04-22 05:42:51,341 :: WARNING :: Disconnected with result code 7
2025-04-22 05:42:51,341 :: WARNING :: The connection was lost.
2025-04-22 05:43:16,213 :: INFO :: 172.18.0.3 - - [22/Apr/2025 05:43:16] "GET /get_vehicleinfo/VR3K**********946?from_cache=1 HTTP/1.1" 200 -
2025-04-22 05:43:50,541 :: ERROR :: refresh_vehicle_info: 
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/dist-packages/psa_car_controller/psacc/application/psa_client.py", line 128, in __refresh_vehicle_info
    self.get_vehicle_info(car.vin)
  File "/usr/local/lib/python3.11/dist-packages/psa_car_controller/psacc/application/psa_client.py", line 111, in get_vehicle_info
    self.record_info(car)
  File "/usr/local/lib/python3.11/dist-packages/psa_car_controller/psacc/application/psa_client.py", line 216, in record_info
    Database.record_battery_soh(car.vin, charge_date, soh)
  File "/usr/local/lib/python3.11/dist-packages/psa_car_controller/psacc/repository/db.py", line 285, in record_battery_soh
    conn.execute("INSERT INTO battery_soh(date, VIN, level) VALUES(?,?,?)", (date, vin, level))
sqlite3.OperationalError: database is locked

ai91 avatar Apr 22 '25 05:04 ai91

Hello, i have the same Problem.

2025-04-22 12:11:11,521 :: INFO :: 172.17.0.1 - - [22/Apr/2025 12:11:11] "GET /get_vehicleinfo/xxxxxxxxxxxxxxxxxx?from_cache=1 HTTP/1.1" 200 -
2025-04-22 12:11:14,039 :: ERROR :: refresh_vehicle_info: 
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/dist-packages/psa_car_controller/psacc/application/psa_client.py", line 128, in __refresh_vehicle_info
    self.get_vehicle_info(car.vin)
  File "/usr/local/lib/python3.11/dist-packages/psa_car_controller/psacc/application/psa_client.py", line 111, in get_vehicle_info
    self.record_info(car)
  File "/usr/local/lib/python3.11/dist-packages/psa_car_controller/psacc/application/psa_client.py", line 216, in record_info
    Database.record_battery_soh(car.vin, charge_date, soh)
  File "/usr/local/lib/python3.11/dist-packages/psa_car_controller/psacc/repository/db.py", line 285, in record_battery_soh
    conn.execute("INSERT INTO battery_soh(date, VIN, level) VALUES(?,?,?)", (date, vin, level))
sqlite3.OperationalError: database is locked

Michel83 avatar Apr 22 '25 10:04 Michel83

Hello,

same to me. I went back to release 3.5.3.

Knarfgm avatar Apr 22 '25 15:04 Knarfgm

Thanks work again.

But now a new error message:

/usr/local/lib/python3.9/dist-packages/urllib3/connectionpool.py:1064: InsecureRequestWarning:

Unverified HTTPS request is being made to host 'api.iternio.com'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings

Michel83 avatar Apr 23 '25 13:04 Michel83

Hello,

now i have a new error message at 3.5.3.

2025-04-28 14:09:26,042 :: INFO :: mqtt msg received: psa/RemoteServices/to/cid/OV-AT200008099014/VehCharge/state/ProcessManagement b'{"process_date":"2025-04-28T14:09:26Z","vin":"V22820","correlation_id":"8eba07466c48431028140924308","process_code":"9081","process_message":"[process.901.vehicle.asleep.key]"}'
2025-04-28 14:09:36,294 :: INFO :: 172.17.0.1 - - [28/Apr/2025 14:09:36] "GET /get_vehicleinfo/VXKUHZ022820?from_cache=1 HTTP/1.1" 200 -
2025-04-28 14:09:36,307 :: INFO :: 172.17.0.1 - - [28/Apr/2025 14:09:36] "GET /get_vehicleinfo/VXKUHZK022820?from_cache=1 HTTP/1.1" 200 -
2025-04-28 14:10:12,429 :: INFO :: 172.17.0.1 - - [28/Apr/2025 14:10:12] "GET /get_vehicleinfo/VXK22820?from_cache=1 HTTP/1.1" 200 -
2025-04-28 14:10:12,447 :: INFO :: 172.17.0.1 - - [28/Apr/2025 14:10:12] "GET /get_vehicleinfo/VXK22820?from_cache=1 HTTP/1.1" 200 -
2025-04-28 14:10:34,974 :: INFO :: mqtt msg received: psa/RemoteServices/to/cid/OV-ACNT200008099014/VehCharge/state b'{"resp_date":"2025-04-28T14:10:34Z","vin":"VXKUHZKX22820","correlation_id":"eb250428140924308","return_code":"300","reason":"[Vehicle.request.time.out]"}'
2025-04-28 14:10:34,975 :: ERROR :: 300 : [Vehicle.request.time.out]
2025-04-28 14:10:48,367 :: INFO :: 172.17.0.1 - - [28/Apr/2025 14:10:48] "GET /get_vehicleinfo/VXK4022820?from_cache=1 HTTP/1.1" 200 -
2025-04-28 14:10:48,379 :: INFO :: 172.17.0.1 - - [28/Apr/2025 14:10:48] "GET /get_vehicleinfo/VXKUH022820?from_cache=1 HTTP/1.1" 200 -
2025-04-28 14:11:24,416 :: INFO :: 172.17.0.1 - - [28/Apr/2025 14:11:24] "GET /get_vehicleinfo/VXK12820?from_cache=1 HTTP/1.1" 200 -
2025-04-28 14:11:24,430 :: INFO :: 172.17.0.1 - - [28/Apr/2025 14:11:24] "GET /get_vehicleinfo/VXKZ22820?from_cache=1 HTTP/1.1" 200 -
/usr/local/lib/python3.9/dist-packages/urllib3/connectionpool.py:1064: InsecureRequestWarning:

Unverified HTTPS request is being made to host 'api.iternio.com'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings

2025-04-28 14:11:26,962 :: INFO :: charging status of V022820 is InProgress, battery level: 63
2025-04-28 14:11:26,963 :: ERROR :: force_update:
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/psacc/application/charge_control.py", line 70, in force_update
    self.psacc.remote_client.wakeup(self.vin)
  File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/common/utils.py", line 23, in wrapper
    raise RateLimitException
psa_car_controller.common.utils.RateLimitException
2025-04-28 14:12:00,254 :: INFO :: 172.17.0.1 - - [28/Apr/2025 14:12:00] "GET /get_vehicleinfo/V022820?from_cache=1 HTTP/1.1" 200 -
2025-04-28 14:12:00,266 :: INFO :: 172.17.0.1 - - [28/Apr/2025 14:12:00] "GET /get_vehicleinfo/VX1S4022820?from_cache=1 HTTP/1.1" 200 -
2025-04-28 14:12:38,219 :: INFO :: 172.17.0.1 - - [28/Apr/2025 14:12:38] "GET /get_vehicleinfo/VXK22820?from_cache=1 HTTP/1.1" 200 -
2025-04-28 14:12:38,241 :: INFO :: 172.17.0.1 - - [28/Apr/2025 14:12:38] "GET /get_vehicleinfo/VXKU22820?from_cache=1 HTTP/1.1" 200 -
2025-04-28 14:13:12,247 :: INFO :: 172.17.0.1 - - [28/Apr/2025 14:13:12] "GET /get_vehicleinfo/VVGHHHHHfrom_cache=1 HTTP/1.1" 200 -
2025-04-28 14:13:12,260 :: INFO :: 172.17.0.1 - - [28/Apr/2025 14:13:12] "GET /get_vehicleinfo/VXKK2820?from_cache=1 HTTP/1.1" 200 -
/usr/local/lib/python3.9/dist-packages/urllib3/connectionpool.py:1064: InsecureRequestWarning:

2025-04-28 14:13:24,969 :: INFO :: charging status of VS4022820 is InProgress, battery level: 63
2025-04-28 14:13:24,970 :: ERROR :: force_update:
Traceback (most recent call last):
    self.psacc.remote_client.wakeup(self.vin)
  File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/common/utils.py", line 23, in wrapper
2025-04-28 14:13:48,319 :: INFO :: 172.17.0.1 - - [28/Apr/2025 14:13:48] "GET /get_vehicleinfo/VS4022820?from_cache=1 HTTP/1.1" 200 -
2025-04-28 14:13:48,331 :: INFO :: 172.17.0.1 - - [28/Apr/2025 14:13:48] "GET /get_vehicleinfo/V22820?from_cache=1 HTTP/1.1" 200 -

Michel83 avatar Apr 28 '25 14:04 Michel83

Thank you so much for a great container @flobz :-) I am using version 3.5.6 as a container in Docker and pull data from cache every 5 mintes. I get the below "database is locked" messages a lot. Would highly appreciate if you are able to address this in a new version :-)

2025-04-29 16:28:59,165 :: ERROR :: refresh_vehicle_info: 
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/dist-packages/psa_car_controller/psacc/application/psa_client.py", line 128, in __refresh_vehicle_info
    self.get_vehicle_info(car.vin)
  File "/usr/local/lib/python3.11/dist-packages/psa_car_controller/psacc/application/psa_client.py", line 111, in get_vehicle_info
    self.record_info(car)
  File "/usr/local/lib/python3.11/dist-packages/psa_car_controller/psacc/application/psa_client.py", line 216, in record_info
    Database.record_battery_soh(car.vin, charge_date, soh)
  File "/usr/local/lib/python3.11/dist-packages/psa_car_controller/psacc/repository/db.py", line 285, in record_battery_soh
    conn.execute("INSERT INTO battery_soh(date, VIN, level) VALUES(?,?,?)", (date, vin, level))
sqlite3.OperationalError: database is locked
2025-04-29 16:30:00,243 :: INFO :: 172.23.0.1 - - [29/Apr/2025 16:30:00] "GET /get_vehicleinfo/MYVIN?from_cache=1 HTTP/1.1" 200 -
2025-04-29 16:30:59,168 :: ERROR :: refresh_vehicle_info: 
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/dist-packages/psa_car_controller/psacc/application/psa_client.py", line 128, in __refresh_vehicle_info
    self.get_vehicle_info(car.vin)
  File "/usr/local/lib/python3.11/dist-packages/psa_car_controller/psacc/application/psa_client.py", line 111, in get_vehicle_info
    self.record_info(car)
  File "/usr/local/lib/python3.11/dist-packages/psa_car_controller/psacc/application/psa_client.py", line 216, in record_info
    Database.record_battery_soh(car.vin, charge_date, soh)
  File "/usr/local/lib/python3.11/dist-packages/psa_car_controller/psacc/repository/db.py", line 285, in record_battery_soh
    conn.execute("INSERT INTO battery_soh(date, VIN, level) VALUES(?,?,?)", (date, vin, level))
sqlite3.OperationalError: database is locked
2025-04-29 16:32:59,181 :: ERROR :: refresh_vehicle_info: 
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/dist-packages/psa_car_controller/psacc/application/psa_client.py", line 128, in __refresh_vehicle_info
    self.get_vehicle_info(car.vin)
  File "/usr/local/lib/python3.11/dist-packages/psa_car_controller/psacc/application/psa_client.py", line 111, in get_vehicle_info
    self.record_info(car)
  File "/usr/local/lib/python3.11/dist-packages/psa_car_controller/psacc/application/psa_client.py", line 216, in record_info
    Database.record_battery_soh(car.vin, charge_date, soh)
  File "/usr/local/lib/python3.11/dist-packages/psa_car_controller/psacc/repository/db.py", line 285, in record_battery_soh
    conn.execute("INSERT INTO battery_soh(date, VIN, level) VALUES(?,?,?)", (date, vin, level))
sqlite3.OperationalError: database is locked
2025-04-29 16:35:00,202 :: INFO :: 172.23.0.1 - - [29/Apr/2025 16:35:00] "GET /get_vehicleinfo/MYVIN?from_cache=1 HTTP/1.1" 200 -
2025-04-29 16:36:59,417 :: ERROR :: refresh_vehicle_info: 
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/dist-packages/psa_car_controller/psacc/application/psa_client.py", line 128, in __refresh_vehicle_info
    self.get_vehicle_info(car.vin)
  File "/usr/local/lib/python3.11/dist-packages/psa_car_controller/psacc/application/psa_client.py", line 111, in get_vehicle_info
    self.record_info(car)
  File "/usr/local/lib/python3.11/dist-packages/psa_car_controller/psacc/application/psa_client.py", line 216, in record_info
    Database.record_battery_soh(car.vin, charge_date, soh)
  File "/usr/local/lib/python3.11/dist-packages/psa_car_controller/psacc/repository/db.py", line 285, in record_battery_soh
    conn.execute("INSERT INTO battery_soh(date, VIN, level) VALUES(?,?,?)", (date, vin, level))
sqlite3.OperationalError: database is locked
2025-04-29 16:38:59,236 :: ERROR :: refresh_vehicle_info: 
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/dist-packages/psa_car_controller/psacc/application/psa_client.py", line 128, in __refresh_vehicle_info
    self.get_vehicle_info(car.vin)
  File "/usr/local/lib/python3.11/dist-packages/psa_car_controller/psacc/application/psa_client.py", line 111, in get_vehicle_info
    self.record_info(car)
  File "/usr/local/lib/python3.11/dist-packages/psa_car_controller/psacc/application/psa_client.py", line 216, in record_info
    Database.record_battery_soh(car.vin, charge_date, soh)
  File "/usr/local/lib/python3.11/dist-packages/psa_car_controller/psacc/repository/db.py", line 285, in record_battery_soh
    conn.execute("INSERT INTO battery_soh(date, VIN, level) VALUES(?,?,?)", (date, vin, level))
sqlite3.OperationalError: database is locked
2025-04-29 16:40:00,199 :: INFO :: 172.23.0.1 - - [29/Apr/2025 16:40:00] "GET /get_vehicleinfo/MYVIN?from_cache=1 HTTP/1.1" 200 -
2025-04-29 16:40:30,099 :: INFO :: <Request 'http://192.168.1.2:5050/charge_control?vin=MYVIN' [GET]>
2025-04-29 16:40:30,101 :: INFO :: 172.23.0.1 - - [29/Apr/2025 16:40:30] "GET /charge_control?vin=MYVIN HTTP/1.1" 200 -
2025-04-29 16:40:59,194 :: ERROR :: refresh_vehicle_info: 
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/dist-packages/psa_car_controller/psacc/application/psa_client.py", line 128, in __refresh_vehicle_info
    self.get_vehicle_info(car.vin)
  File "/usr/local/lib/python3.11/dist-packages/psa_car_controller/psacc/application/psa_client.py", line 111, in get_vehicle_info
    self.record_info(car)
  File "/usr/local/lib/python3.11/dist-packages/psa_car_controller/psacc/application/psa_client.py", line 216, in record_info
    Database.record_battery_soh(car.vin, charge_date, soh)
  File "/usr/local/lib/python3.11/dist-packages/psa_car_controller/psacc/repository/db.py", line 285, in record_battery_soh
    conn.execute("INSERT INTO battery_soh(date, VIN, level) VALUES(?,?,?)", (date, vin, level))
sqlite3.OperationalError: database is locked
2025-04-29 16:44:59,263 :: ERROR :: refresh_vehicle_info: 
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/dist-packages/psa_car_controller/psacc/application/psa_client.py", line 128, in __refresh_vehicle_info
    self.get_vehicle_info(car.vin)
  File "/usr/local/lib/python3.11/dist-packages/psa_car_controller/psacc/application/psa_client.py", line 111, in get_vehicle_info
    self.record_info(car)
  File "/usr/local/lib/python3.11/dist-packages/psa_car_controller/psacc/application/psa_client.py", line 216, in record_info
    Database.record_battery_soh(car.vin, charge_date, soh)
  File "/usr/local/lib/python3.11/dist-packages/psa_car_controller/psacc/repository/db.py", line 285, in record_battery_soh
    conn.execute("INSERT INTO battery_soh(date, VIN, level) VALUES(?,?,?)", (date, vin, level))
sqlite3.OperationalError: database is locked
2025-04-29 16:45:00,362 :: INFO :: 172.23.0.1 - - [29/Apr/2025 16:45:00] "GET /get_vehicleinfo/MYVIN?from_cache=1 HTTP/1.1" 200 -
2025-04-29 16:46:59,752 :: ERROR :: refresh_vehicle_info: 
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/dist-packages/psa_car_controller/psacc/application/psa_client.py", line 128, in __refresh_vehicle_info
    self.get_vehicle_info(car.vin)
  File "/usr/local/lib/python3.11/dist-packages/psa_car_controller/psacc/application/psa_client.py", line 111, in get_vehicle_info
    self.record_info(car)
  File "/usr/local/lib/python3.11/dist-packages/psa_car_controller/psacc/application/psa_client.py", line 216, in record_info
    Database.record_battery_soh(car.vin, charge_date, soh)
  File "/usr/local/lib/python3.11/dist-packages/psa_car_controller/psacc/repository/db.py", line 285, in record_battery_soh
    conn.execute("INSERT INTO battery_soh(date, VIN, level) VALUES(?,?,?)", (date, vin, level))
sqlite3.OperationalError: database is locked
2025-04-29 16:49:00,999 :: ERROR :: refresh_vehicle_info: 
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/dist-packages/psa_car_controller/psacc/application/psa_client.py", line 128, in __refresh_vehicle_info
    self.get_vehicle_info(car.vin)
  File "/usr/local/lib/python3.11/dist-packages/psa_car_controller/psacc/application/psa_client.py", line 111, in get_vehicle_info
    self.record_info(car)
  File "/usr/local/lib/python3.11/dist-packages/psa_car_controller/psacc/application/psa_client.py", line 216, in record_info
    Database.record_battery_soh(car.vin, charge_date, soh)
  File "/usr/local/lib/python3.11/dist-packages/psa_car_controller/psacc/repository/db.py", line 285, in record_battery_soh
    conn.execute("INSERT INTO battery_soh(date, VIN, level) VALUES(?,?,?)", (date, vin, level))
sqlite3.OperationalError: database is locked
2025-04-29 16:49:03,510 :: INFO :: save config change
2025-04-29 16:50:00,202 :: INFO :: 172.23.0.1 - - [29/Apr/2025 16:50:00] "GET /get_vehicleinfo/MYVIN?from_cache=1 HTTP/1.1" 200 -

elgeniskogen avatar Apr 29 '25 17:04 elgeniskogen

Hello,

same to me. I went back to release 3.5.3.

how did you do it?

ellep94 avatar Apr 30 '25 11:04 ellep94

Hello, same to me. I went back to release 3.5.3.

how did you do it?

If you're running it in a docker container, you can change the repo to use flobz/psa_car_controller:v3.5.3

LilSlippinJimmy avatar Apr 30 '25 11:04 LilSlippinJimmy

Hello, same to me. I went back to release 3.5.3.

how did you do it?

If you're running it in a docker container, you can change the repo to use flobz/psa_car_controller:v3.5.3

Any drawback of going back to version 3.5.3? Do I loose any functionality?

elgeniskogen avatar Apr 30 '25 13:04 elgeniskogen

Hello, same to me. I went back to release 3.5.3.

how did you do it?

If you're running it in a docker container, you can change the repo to use flobz/psa_car_controller:v3.5.3

Any drawback of going back to version 3.5.3? Do I loose any functionality?

Not that I've noticed, just happy that it's working flawlessly now on that version

LilSlippinJimmy avatar Apr 30 '25 13:04 LilSlippinJimmy

Hello, Indeed, I'm using a docker container : so I was able to go back to the repo flobz/psa_car_controller:v3.5.3 My config and data folder is external to the container, so I was able to map the container 3.5.3 to my old data : I did not lose data nor configuration.

Knarfgm avatar Apr 30 '25 15:04 Knarfgm

Thank you so much for sharing your experience and solution. My degrade to v3.5.3 docker went flawless without loosing data nor need to login again :-)

Are any of you using Citroen E-C4? Do you get positions from your car?

elgeniskogen avatar May 02 '25 12:05 elgeniskogen

Same here... since upgrade from 3.5.3 to 3.5.6 I have this issue... How can I downgrade in Home Assistant Integration of PSA?

gwgittrash avatar May 23 '25 15:05 gwgittrash

Same here... since upgrade from 3.5.3 to 3.5.6 I have this issue... How can I downgrade in Home Assistant Integration of PSA?

I've forked the psacc-ha repo and adjusted the version. I didn't copy my config files across but I suppose you could.

https://github.com/jonnydayy/ha-dberror if you want it

jonnydayy avatar Jun 03 '25 16:06 jonnydayy

Same here... since upgrade from 3.5.3 to 3.5.6 I have this issue... How can I downgrade in Home Assistant Integration of PSA?

I've forked the psacc-ha repo and adjusted the version. I didn't copy my config files across but I suppose you could.

https://github.com/jonnydayy/ha-dberror if you want it

Hoi Jonnydayy Dowgrade worked for me as workaround - more or less. "Control" Tabe is no longer working but all other functions are running. I am waiting for a general solution and will follow Connect to SQLite using WAL mode #998

gwgittrash avatar Jun 23 '25 09:06 gwgittrash

@flobz could you please build a docker image (alpha, or new tag), so we can test it somehow?

ai91 avatar Jul 11 '25 22:07 ai91

@ai91 it's available under the image tag v3.5.8b2

https://hub.docker.com/layers/flobz/psa_car_controller/v3.5.8b2/

Nicnl avatar Sep 13 '25 21:09 Nicnl

@ai91 it's available under the image tag v3.5.8b2

https://hub.docker.com/layers/flobz/psa_car_controller/v3.5.8b2/

Could you build amd64 image too? I could test it out as well.

kotope avatar Sep 14 '25 07:09 kotope

I've installed V3.5.8b2, and the locked database issue is still there, unfortunately.

Image

Trebila avatar Sep 14 '25 16:09 Trebila

I actually downdated back to v3.5.7, because I was unable to do the otp procedure with v3.5.8b2, the oauth2 code was never accepted. Once downdated to v3.5.7, otp procedure ok at the first attempt.

Trebila avatar Sep 14 '25 22:09 Trebila

Can you try v3.5.8b4 please ?

flobz avatar Sep 30 '25 16:09 flobz

@flobz , I installed your last release for 1 hour and half and I don't see the database error in the logs.👍

Thanks

Knarfgm avatar Sep 30 '25 18:09 Knarfgm

I've also updated to the latest 3.5.8b4 and so far, so good 😊 Will let you know if I run into any issues.

LilSlippinJimmy avatar Sep 30 '25 20:09 LilSlippinJimmy

For database lock issue I have increased the timeout=30

I have the controller installed into a container . Container management is done though Portainer.

From Container console

sed -i 's/sqlite3.connect(filename)/sqlite3.connect(filename, timeout=30)/' /usr/local/lib/python3.11/dist-packages/psa_car_controller/psacc/repository/db.py

I will check if this helps with up to charging status while changing.

Polling (/get_vehicleinfo + /charge_control) is happening every minute

ionutfdumitru avatar Oct 01 '25 09:10 ionutfdumitru

Can you try v3.5.8b4 please ?

v3.5.8b4 installed. I'll wait for a day or 2 before saying it's fixed, I've seen frequently no database lock during 24 hours with previous version.

Trebila avatar Oct 01 '25 17:10 Trebila

it's fixed for sure, thanks

Trebila avatar Oct 04 '25 13:10 Trebila