boysetsfrog / vimpc

Official repository for vimpc a vi/vim inspired client for the Music Player Daemon (mpd). Pull requests are welcome.
GNU General Public License v3.0
269 stars 34 forks source link

Can't connect to MPD 0.18 #32

Closed ghost closed 10 years ago

ghost commented 10 years ago

I can't connect to MPD using vimpc. Mpc and ncmpcpp can connect without any problem.

Some info:

just after launch: 2013-12-07-162442_1920x1200_scrot

debug-console (screenshot, because i can't find logs): 2013-12-07-161216_1920x1200_scrot I just launched vimpc, opened debug-console and ran connect localhost 6600

Error message from mpd.log: Dec 07 16:46 : buffered_socket: error on client 18: Output buffer is full

boysetsfrog commented 10 years ago

How many songs do you have in your mpd database? I suspect this is because vimpc requests the entire database from mpd, whilst ncmpcpp does not do this. vimpc primarily does this to populate the browse tab and to ensure that the library is constructed in a particular way. I suspect that if you increase the max_output_buffer_size in mpd.conf that vimpc will connect. Ideally it would be nice to not have to do this, however I am not really sure if there is a way for vimpc to provide the UI that I want it to have, without getting the whole database. I personally have no other ideas on how to do this, currently.

ghost commented 10 years ago

My song database is quite big: ~10000 tracks, but even after increasing max_output_buffer_size param to 8192000 I still get the same message. I tried also with much smaller database and then I can connect without problem. Probably I still have some garbage in tags (like images or something). Database file has 12MB.

I see there is problem with listallinfo call. I think it should be possible to fetch whole database, directory by directory, using: listallinfo dirname. It works quite well through telnet for me with my full database, so here is some idea.

boysetsfrog commented 10 years ago

10,000 songs certainly isn't really that many, I was meaning something more like 100,000 songs. I certainly use vimpc/mpd with 10k-20k songs myself. It is possible that the tags include a large amount of data, as you suggest, I am not sure. And I am pretty sure 8192 is the default setting. I am not sure how happy mpd would be if you actually wrote "8192000" though. But since your DB is 12MB i would try something like 16384. In regards to doing listallinfo on a directory to get the db per directory, that would require a lot of messages between the client and server and it seems to be recursive anyway such that if you have a song in the root directory of mpd, you would have to do listallinfo / which should be no less data than what you have now.

ghost commented 10 years ago

And I am pretty sure 8192 is the default setting. I am not sure how happy mpd would be if you actually wrote "8192000" though. But since your DB is 12MB i would try something like 16384.

Yes, exactly. Changing buffer size to realistic value solved problem.

matthiasbeyer commented 5 years ago

Helped me as well. Thanks.