fatg3erman / RompR

Web client for Mopidy and MPD
https://fatg3erman.github.io/RompR/
Other
189 stars 22 forks source link

Possible solution to MariaDB issues #110

Closed kingbu closed 3 years ago

kingbu commented 3 years ago

Hi all!

I've been able to solve MARIADB connection errors on Rompr version 1.54 adding the following line to "custom.cnf"

innodb_default_row_format = dynamic \ innodb_file_format=barracuda \ innodb_file_per_table=true \ innodb_large_prefix=true \ innodb_flush_log_at_trx_commit = 0 \ skip-log-bin

It works like a charm now.

Until version 1.48 all were working fine. Issues started upgrading to 1.54 version

Mariadb is running on a docker image on a Pi3B+ ;)

Hope to help someone. Cheers

fatg3erman commented 3 years ago

This is great info thanks. Can you confirm which version of Mariadb you are using, as this makes a difference.

kingbu commented 3 years ago

Of corse...

Here it is

"mysql Ver 15.1 Distrib 10.1.47-MariaDB, for debian-linux-gnueabihf"

I struggled a bit o solve that matter. As I said all worked well till the update to 1.54 version.

Thanks for all Your work anyway, I am a long time rompr user.

uriel1998 commented 3 years ago

How does one add/edit the .cnf file? I'm running into memory errors when updating the database, and it might be something like this? (I also can't seem to get my PHP memory for rompr above 128M, even though the master value is higher, so that might be pointing to another point of user error, but I want to check this first.)

fatg3erman commented 3 years ago

What are the exact errors you're seeing?

uriel1998 commented 3 years ago

[Fri Feb 26 17:34:25.569258 2021] [php7:notice] [pid 1101037] [client 192.168.1.101:33870] PHP Notice: ob_flush(): failed to f lush buffer. No buffer to flush in /var/www/ssxyz/rompr/api/collection/index.php on line 323, referer: https://stevesaus.xyz/ro mpr/ [Fri Feb 26 17:35:05.945577 2021] [php7:error] [pid 1101037] [client 192.168.1.101:33870] PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) in /var/www/ssxyz/rompr/player/base_mpd_player.class.php on line 344, referer: https://stevesaus.xyz/rompr/

From phpinfo:
(local value, master value) memory_limit | 128M | 512M

fatg3erman commented 3 years ago

Local value of 128MB will override the master value. I'm not in front of a computer now to check, but I think there is a memory_limit in the rompr.cnf Apache config file that you should have created when you installed romor. You can just remove that.

i'm surprised you're hitting that limit though. Do you have a lot of albums that do not have an Album Artist in the tags?

uriel1998 commented 3 years ago

Oh my goodness, looks like a lot of problem exists between chair and keyboard here. The memory limit's in the .conf file for the site, which I didn't look at (or realize that it overrode php.ini or .htaccess commands in the document root). And I'd neglected/not realized how to/bit of both for the proper cnf tweaks for MySQL. After tuning those two, it works just fine.

I do have a bunch of mp3 without Album Artist, for what it's worth.

Thank you for your patience with me being a doofus and for all the work you've done.

fatg3erman commented 3 years ago

No problem, glad it's working.

I'm still surprised you're hitting that memory limit though, I shall have to take a look atthat code gain, so I'm leaving this open.

fatg3erman commented 3 years ago

I was right, I did introduce a regression where it could potentially use a huge amount of memory if you have a lot of albums with no Album Artist. That will be fixed in the next release. It might make those albums sort differently - it shouldn't but it might - but versions pre-1.52 would have sorted them that way too.