Skip to content

Commit 453252d

Browse files
authored
Only set file limit to a max of 524288 (#93)
1 parent 800d3ee commit 453252d

File tree

1 file changed

+5
-1
lines changed
  • rootfs/etc/s6-overlay/s6-rc.d/teslamate

1 file changed

+5
-1
lines changed

rootfs/etc/s6-overlay/s6-rc.d/teslamate/run

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,11 @@ if [[ -z $(PGPASSWORD="$DATABASE_PASS" psql -h "$DATABASE_HOST" -p "$DATABASE_PO
113113
bashio::log.notice "=> Dashboards: $grafana_ingress"
114114
bashio::log.notice ""
115115
fi
116-
ulimit -n 1048576
116+
117+
# Set max open file limit to avoid memory allocation issues
118+
if [ "$(ulimit -Hn)" -gt 524288 ]; then
119+
ulimit -n 524288
120+
fi
117121

118122
bashio::log.info "Starting TeslaMate..."
119123

0 commit comments

Comments
 (0)