Suggestion: Warn about potential issues

3.2.0.beta4-dev in simple rebuild, not update. Running over fully patched Ubuntu 22.

  1. Ref log1 below: I understand the messages are just warnings. I suggest that when we are expecting something that looks like an “error” to an admin that INFO get injected into the setup:

INFO: The following command may yield an expected warning which can be ignored.

  1. Similarly, we’ve seen reports (over many years) of a hang or stall at " Background saving terminated with success ". The issue is not with the background saving but with the process that follows it, which is not announced. That next operation can just take a long time compared to others. An INFO note here would be helpful as well:

INFO: The following operation can take a long time. Expect 5 to 30 minutes or more.
INFO: Please be patient and do not interrupt this process.

  1. The actual text “Background saving terminated with success” sounds . Why would we “terminate” a background process that is saving something?

* Background saving started by pid 904
* DB saved on disk
* Fork CoW for RDB: current 1 MB, peak 1 MB, average 0 MB
* Background saving terminated with success

I understand that “the background wasn’t terminated”, as in "an action was performed that intended to terminate the operation. But the verb “terminate” can be transitive or intransitive. How about changing that to something less ambiguous, like “Background DB save completed successfully” ?

  1. Ref log2 below and related to #2 above. What is intended to happen after that background saving process? I don’t know but if I wait 24 minutes I see “Warning” messages that really look like “Error” issues to me. Prior to the one or more long-running operations, I suggest an INFO that describes what is going to be attempted:

INFO: Something is about to be done related to email.
INFO: The following operation can take a long time. Expect 5 to 30 minutes or more.
INFO: Please be patient and do not interrupt this process.

And as an “issue report” I’ll note that the 20+ minute delay and subsequent warnings are always occurring in the latest beta-dev. The “LOG: database system is shut down” message is alarming, as is the long pause that occurs after that.

Thanks!!

Log1:

I, [2023-11-30T19:16:37.221350 #1]  INFO -- :
I, [2023-11-30T19:16:37.222007 #1]  INFO -- : > cd /var/www/discourse && su discourse -c 'yarn install --frozen-lockfile && yarn cache clean'
warning " > @glint/environment-ember-loose@1.1.0" has unmet peer dependency "@glimmer/component@^1.1.2".
warning " > @glint/environment-ember-template-imports@1.1.0" has unmet peer dependency "ember-template-imports@^3.0.0".
warning Resolution field "unset-value@2.0.1" is incompatible with requested version "unset-value@^1.0.0"
warning Pattern ["wrap-ansi@^7.0.0"] is trying to unpack in the same destination "/home/discourse/.cache/yarn/v6/npm-wrap-ansi-cjs-7.0.0-67e145cff510a6a6984bdf1152911d69d2eb9e43-integrity/node_modules/wrap-ansi-cjs" as pattern ["wrap-ansi-c
js@npm:wrap-ansi@^7.0.0"]. This could result in non-deterministic behavior, skipping.
warning " > discourse-markdown-it@1.0.0" has unmet peer dependency "xss@*".
warning "workspace-aggregator-577e4c44-4eab-4cdd-b260-702143419d8a > discourse > @ember/legacy-built-in-components@0.5.0" has incorrect peer dependency "ember-source@>= 4.8".
warning "workspace-aggregator-577e4c44-4eab-4cdd-b260-702143419d8a > discourse > @uppy/aws-s3@3.0.6" has incorrect peer dependency "@uppy/core@^3.1.2".
warning "workspace-aggregator-577e4c44-4eab-4cdd-b260-702143419d8a > discourse > @uppy/aws-s3-multipart@3.1.3" has incorrect peer dependency "@uppy/core@^3.1.2".
warning "workspace-aggregator-577e4c44-4eab-4cdd-b260-702143419d8a > discourse > @uppy/xhr-upload@3.1.1" has incorrect peer dependency "@uppy/core@^3.1.2".
warning "workspace-aggregator-577e4c44-4eab-4cdd-b260-702143419d8a > discourse-plugins > ember-this-fallback@0.4.0" has unmet peer dependency "ember-source@^3.28.11 || ^4.0.0".
warning "workspace-aggregator-577e4c44-4eab-4cdd-b260-702143419d8a > discourse > @uppy/aws-s3 > @uppy/xhr-upload@3.3.0" has incorrect peer dependency "@uppy/core@^3.2.1".
I, [2023-11-30T19:20:49.159245 #1]  INFO -- : yarn install v1.22.19
[1/5] Validating package.json...
[2/5] Resolving packages...
[3/5] Fetching packages...
[4/5] Linking dependencies...
[5/5] Building fresh packages...

Log2:

110:M 30 Nov 2023 02:09:26.839 * Background saving terminated with success
2023-11-30 02:33:14.679 UTC [41] LOG:  lock file "postmaster.pid" contains wrong PID: 566 instead of 41
2023-11-30 02:33:14.689 UTC [41] LOG:  performing immediate shutdown because data directory lock file is invalid
2023-11-30 02:33:14.689 UTC [41] LOG:  received immediate shutdown request
2023-11-30 02:33:14.849 UTC [982] WARNING:  terminating connection because of crash of another server process
2023-11-30 02:33:14.849 UTC [982] DETAIL:  The postmaster has commanded this server process to roll back the current transaction and exit, because another server process exited abnormally and possibly corrupted shared memory.
2023-11-30 02:33:14.849 UTC [982] HINT:  In a moment you should be able to reconnect to the database and repeat your command.
2023-11-30 02:33:14.898 UTC [48] WARNING:  terminating connection because of crash of another server process
2023-11-30 02:33:14.898 UTC [48] DETAIL:  The postmaster has commanded this server process to roll back the current transaction and exit, because another server process exited abnormally and possibly corrupted shared memory.
2023-11-30 02:33:14.898 UTC [48] HINT:  In a moment you should be able to reconnect to the database and repeat your command.
2023-11-30 02:33:15.486 UTC [41] LOG:  database system is shut down
3 Likes

Good ideas here.

The long pauses didn’t stand out to me during my initial installation—probably because I’m prone to flip away to another tab and lose track of time. Had I been more focused, I might have CTRL-C-ed out, thinking the process was hung.

More recently, I was rebuilding to recover from a problem, and keeping a closer eye on things. The long pauses and warnings in the logs did make me a little nervous.

If it would be tedious for devs to insert info text throughout the setup scripts, I wouldn’t mind just having an accompanying README that lists the specific warnings to expect, commands followed by long pauses, and other things to not panic about.

1 Like

As a new user currently sat here watching my terminal window do nothing with “Background saving terminated with success” the last thing displayed, I’d heartily agree with point 2!

1 Like