File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -39,10 +39,10 @@ if [ "$REFRESH_PARALLEL" = "true" ]; then
3939 HEAVY_WORK_MEM=" ${HEAVY_WORK_MEM:- 512MB} "
4040 HEAVY_MAINT_MEM=" ${HEAVY_MAINT_MEM:- 4GB} "
4141else
42- LIGHT_WORK_MEM=" ${LIGHT_WORK_MEM:- 2GB } "
43- LIGHT_MAINT_MEM=" ${LIGHT_MAINT_MEM:- 4GB } "
44- HEAVY_WORK_MEM=" ${HEAVY_WORK_MEM:- 4GB } "
45- HEAVY_MAINT_MEM=" ${HEAVY_MAINT_MEM:- 8GB } "
42+ LIGHT_WORK_MEM=" ${LIGHT_WORK_MEM:- 1GB } "
43+ LIGHT_MAINT_MEM=" ${LIGHT_MAINT_MEM:- 2GB } "
44+ HEAVY_WORK_MEM=" ${HEAVY_WORK_MEM:- 2GB } "
45+ HEAVY_MAINT_MEM=" ${HEAVY_MAINT_MEM:- 4GB } "
4646fi
4747
4848function refresh_mviews_group() {
Original file line number Diff line number Diff line change @@ -181,19 +181,23 @@ function monitorImposmErrors() {
181181
182182 # Wait a bit and check if connection recovers
183183 sleep 30
184- # Clear the error from log to avoid immediate re-trigger
185- sed -i ' /driver: bad connection/d ' " $LOG_FILE " 2> /dev/null || true
184+ # Clear errors from log to avoid immediate re-trigger
185+ > " $LOG_FILE "
186186 elif grep -q " \[error\] Importing" " $LOG_FILE " ; then
187187 # Other import errors - log but don't immediately restart
188188 log_message " Detected [error] Importing in Imposm log. Monitoring..."
189189 ERROR_COUNT=$(( ERROR_COUNT + 1 ))
190-
190+
191191 if [ $ERROR_COUNT -ge $MAX_ERRORS ]; then
192192 log_message " Max errors reached ($MAX_ERRORS ). Restarting container..."
193193 kill $UPLOADER_PID 2> /dev/null
194194 kill $IMPOSM_PID 2> /dev/null
195195 exit 1
196196 fi
197+
198+ # Wait and clear log to avoid re-detecting the same error
199+ sleep 30
200+ > " $LOG_FILE "
197201 else
198202 # Reset error count if no errors found
199203 if [ $ERROR_COUNT -gt 0 ]; then
You can’t perform that action at this time.
0 commit comments