UnamSanctam / UnamWebPanel

MIT License
175 stars 58 forks source link

Question about the new version #216

Closed masterjek closed 1 year ago

masterjek commented 1 year ago

Good afternoon Unam. Tell me this is normal, after 5 minutes of web panel work database file - empty its size - 32KB. File - unamwebpanel.db-wal - size - 1,27 GB and constantly increasing. File - unamwebpanel.db-shm - size - 3,78MB and constantly increasing. Both files (unamwebpanel.db-wal and unamwebpanel.db-shm) do not disappear as before, they are constantly visible. The web panel itself works fine, there are no errors in the folder.

UnamSanctam commented 1 year ago

You can try setting PDO::ATTR_PERSISTENT to false here: https://github.com/UnamSanctam/UnamWebPanel/blob/6db3f512896c4bbb6d7ee7601285faaa93ae5ded/UnamWebPanel/class/db.php#L15, you might need to restart Apache after. You might also need to run PRAGMA wal_checkpoint(2); to force it to checkpoint it. I've seen that happen once or twice (wal increasing and never checkpointing), but I haven't been able to reproduce it happening since.

masterjek commented 1 year ago

"PRAGMA wal_checkpoint(2)" - Where is this setting?

UnamSanctam commented 1 year ago

Open the database with an SQLite client such as DB Browser for SQLite.

masterjek commented 1 year ago

1 I underlined in the screenshot - this is the parameter.

UnamSanctam commented 1 year ago

Yes you can set a limit if you want, though you'd need to enter it into the db.php file as PRAGMA journal_size_limit = X; which X being the maximum amount of bytes. By default SQLite doesn't decrease it because overwriting is faster than appending, though the limit only applies when the database is inactive (not busy/locked). But if you run the command I sent in the "Execute SQL" tab then it should checkpoint your current wal file.

masterjek commented 1 year ago

Sorry for stupid questions - "PRAGMA journal_size_limit = X" - what line should i put this in the file db.php? 2

UnamSanctam commented 1 year ago

Just after PRAGMA foreign_keys = ON;

masterjek commented 1 year ago

Thanks for the help. I did everything as you wrote above, now the panel is working normally, writing to the database is in progress. I didn't know what number to put instead "X" i put it at random - 268435456.

UnamSanctam commented 1 year ago

Alright great!

masterjek commented 1 year ago

One more problem. In version 1.6.0, all miners with the status "Error" i switched to another pool and they worked without problems. In version 1.7.0 miners with status "Error" in the web panel they switch to another configuration, but this happens only visually, the workers on the computers themselves do not receive this configuration. I returned version 1.6.0 again and all the miners with an error normally switched to the web panel and transferred this configuration to the workers on the computers.

UnamSanctam commented 1 year ago

What do you mean by only visually? You mean that the "Configuration" option changed correctly but the reported Pool and everything stayed the same?

masterjek commented 1 year ago

Yes, in the web panel, I see that the miners have switched to another pool, but almost all of them have a hash rate of zero and the pool does not see them. As soon as I return version 1.6.0, everything starts working without problems. I already had such a problem in version 1.6.0, but when you then set up version 1.6.0 for me to work quickly, this problem disappeared. I remember you then set up the work of the web panel on Apache for a long time. But after your setup everything started working just perfect. I'll probably go back to version 1.6.0 for the time being, there are no problems for me at the moment. Those workers who, with an error, I switch to the pool - moneroocean and they're all workin through XMRIG Proxy And so I see very well how workers disappear in XMRIG Proxy the most interesting thing is that in the web panel they show that they switched to a new configuration, but do not work on it.

UnamSanctam commented 1 year ago

Hmm, if the web panel says that they're mining to the new pool then they are mining to it which is the weird part. You can try just disabling the hashrate history in the configuration, it will improve the performance by a massive amount.

masterjek commented 1 year ago

I think nothing will be terrible if I stay on version 1.6.0? Just after your settings version 1.6.0 works for me very stable and fast.

UnamSanctam commented 1 year ago

No that's fine, version 1.7.0 just has a lot better performance (with hashrate history turned off).

masterjek commented 1 year ago

I'll ask a question in this thread, here the miner has been offline for 40 minutes - Offline (40m 2s). But the bar at the top shows 0 1

UnamSanctam commented 1 year ago

Hmm, it works for me...

masterjek commented 1 year ago

I'm sorry, it just worked, the offline statistics began to update.