zenhack / ttrss-sandstorm

Sandstorm port of Tiny Tiny RSS
GNU General Public License v3.0
6 stars 2 forks source link

Mysql(?) error in log #43

Open jdougan opened 1 year ago

jdougan commented 1 year ago

Now that I have my sandstorm install up to date, I'm trying to track down an issue where tt-rss it suddenly drops down to uusing almost no disk bandwidth, which shouldn't really happen with the usual stream of feed data coming in and a 3.5GB tt-rss grain on a 1GB VPS.

At approximately the right time, in the tt-rss log file I'm seeing:

** SANDSTORM SUPERVISOR: Starting up grain. Sandbox type: userns
2022-12-15T15:45:01.168741Z 0 [Warning] Changed limits: max_open_files: 1024 (requested 5000)
2022-12-15T15:45:01.169040Z 0 [Warning] Changed limits: table_open_cache: 431 (requested 2000)
2022-12-15T15:45:01.170555Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2022-12-15T15:45:01.174971Z 0 [ERROR] --initialize specified but the data directory has files in it. Aborting.
2022-12-15T15:45:01.175152Z 0 [ERROR] Aborting

Any sense of what is happening and if it is harmful?

At least part of this is mysql messages complaing abour resources. [1] suggests to change stuff in the main system config, is that the right place given mysql is running under sandstorm?

[1] https://www.myserverfix.com/mysql-error-solved-warning-changed-limits-max_open_files/

ocdtrekkie commented 1 year ago

This is normal, I believe. We always initialize the database, and expect it to fail if it exists already.

jdougan commented 1 year ago

Do the resource warnings have any significance?

ocdtrekkie commented 1 year ago

Hmmm, it probably is worth noting that we generally don't find Sandstorm runs well at 1 GB. (For a while it wouldn't install successfully without more, but I think we fixed that.) It's definitely possible resource issues are impacting you there in some way, but I don't know how to troubleshoot it, personally.

zenhack commented 1 year ago

Those resource warnings are about open file limits, not memory limits, so it isn't an issue with 1GB ram. It seems plausible to me that that could be affecting performance; I know many databases seem to want to open a large number of files at once. I wonder if Sandstorm should set a higher limit to accommodate this.

jdougan commented 1 year ago

Where are the limits set for sandstorm grains?

zenhack commented 1 year ago

Look for setrlimit(RLIMIT_NOFILE, ...) in supervsior.c++