Skip to content
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

Input - loop() Error #1338

Open
mlenzi18 opened this issue Oct 4, 2023 · 1 comment
Open

Input - loop() Error #1338

mlenzi18 opened this issue Oct 4, 2023 · 1 comment

Comments

@mlenzi18
Copy link

mlenzi18 commented Oct 4, 2023

  • Mycodo Version: 8.15.9
  • Raspberry Pi Version: 4B
  • Raspbian OS Version: Raspbian Bullseye 11

I can not specifically make this happen. It happens about every 8-15 hours with no indication when it is going to happen. The daemon crashes with a runtime error as the first indication of an error in the log. The error starts everytime with a loop () error associated to varying inputs each time it begins. But which input it starts with is not constant. Below is the most recent error with daemon debug on. It continues to list this error over and over with different inputs. I am not sure what I am looking at, but I can dig further, or try different things with some direction. Thanks.

2023-10-03 22:55:11,056 - ERROR - mycodo.controllers.controller_input_c270dfde - loop() Error
Traceback (most recent call last):
  File "/var/mycodo-root/mycodo/controllers/base_controller.py", line 81, in run
    self.loop()
  File "/var/mycodo-root/mycodo/controllers/controller_input.py", line 245, in loop
    add_measurements_influxdb(
  File "/var/mycodo-root/mycodo/utils/influx.py", line 177, in add_measurements_influxdb
    write_db.start()
  File "/usr/lib/python3.9/threading.py", line 874, in start
    _start_new_thread(self._bootstrap, ())
RuntimeError: can't start new thread
2023-10-03 22:55:11,261 - DEBUG - mycodo.lockfile - Acquiring lock for /var/lock/atlas_mycodo_devices_atlas_scientific_i2c_26_100.lock (10 sec timeout)
2023-10-03 22:55:11,283 - DEBUG - mycodo.lockfile - Releasing lock for /var/lock/atlas_mycodo_devices_atlas_scientific_i2c_24_99.lock
2023-10-03 22:55:11,572 - DEBUG - mycodo.influx - query_flux() query: 'from(bucket: "mycodo_db/autogen") |> range(start: -360s) |> filter(fn: (r) => r["_measurement"] == "F") |> filter(fn: (r) => r["device_id"] == "022dc9de-7e89-4fda-9583-bab5d53aff9f") |> filter(fn: (r) => r["channel"] == "0") |> last()'
2023-10-03 22:55:12,648 - DEBUG - mycodo.influx - query_flux() query: 'from(bucket: "mycodo_db/autogen") |> range(start: -360s) |> filter(fn: (r) => r["_measurement"] == "F") |> filter(fn: (r) => r["device_id"] == "c270dfde-eea4-4961-9b5c-6c9f1f64f47f") |> filter(fn: (r) => r["channel"] == "0") |> last()'
2023-10-03 22:55:12,677 - DEBUG - mycodo.influx - query_flux() query: 'from(bucket: "mycodo_db/autogen") |> range(start: -60s) |> filter(fn: (r) => r["_measurement"] == "pH") |> filter(fn: (r) => r["device_id"] == "11235625-86d7-4a97-ac35-736c2975c975") |> filter(fn: (r) => r["channel"] == "0") |> filter(fn: (r) => r["measure"] == "ion_concentration") |> last()'
2023-10-03 22:55:12,921 - DEBUG - mycodo.influx - Write point success: b'F,channel=0,device_id=c270dfde-eea4-4961-9b5c-6c9f1f64f47f value=83.42161\npercent,channel=1,device_id=c270dfde-eea4-4961-9b5c-6c9f1f64f47f,measure=humidity value=76.06164644846265\nPa,channel=3,device_id=c270dfde-eea4-4961-9b5c-6c9f1f64f47f,measure=vapor_pressure_deficit value=934.9744384782223'
2023-10-03 22:55:13,024 - ERROR - mycodo.controllers.controller_input_11235625 - loop() Error
Traceback (most recent call last):
  File "/var/mycodo-root/mycodo/controllers/base_controller.py", line 81, in run
    self.loop()
  File "/var/mycodo-root/mycodo/controllers/controller_input.py", line 245, in loop
    add_measurements_influxdb(
  File "/var/mycodo-root/mycodo/utils/influx.py", line 177, in add_measurements_influxdb
    write_db.start()
  File "/usr/lib/python3.9/threading.py", line 874, in start
    _start_new_thread(self._bootstrap, ())
RuntimeError: can't start new thread
@kizniche
Copy link
Owner

How many threads are running?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants