Disk I/O error after PC sleep [#21538]

Get answers about using MediaMonkey 4 for Windows.

Moderator: Gurus

Aff
Posts: 307
Joined: Sun Oct 05, 2008 4:46 pm
Location: Switzerland

Disk I/O error after PC sleep [#21538]

Post by Aff »

Hi

Whenever my PC goes to sleep with MM running, I get loads of error messages after wake up "Error executing SQL statement" and "disk I/O error (10, 10)".
I can press Cancel, Repeat or Ignore, either way the error messages come again and MM isn't usable.
Sometimes MM doesn't completely close and locks the MM.Db, so at the next start of MM it wants to create a new database.

My MM.DB and files are on a NAS. MM is installed in portable mode on Windows 10 64Bit.

The problem exists since a longer time, don't know how long, but recently I used MM more so it annoys me enough now to post this.

Is it a known problem? Any idea how to solve?
Lowlander
Posts: 58114
Joined: Sat Sep 06, 2003 5:53 pm
Location: MediaMonkey 5

Re: Disk I/O error after PC sleep

Post by Lowlander »

The problem is that the connection the NAS is lost/drives on NAS are asleep and thus MediaMonkey can't access the database. This causes the disk I/O problem.
Aff
Posts: 307
Joined: Sun Oct 05, 2008 4:46 pm
Location: Switzerland

Re: Disk I/O error after PC sleep

Post by Aff »

Thanks for your reply.

It would be better for MM to:
  1. Wait until the NAS is available again or a time out of e.g. 10 seconds is reached
  2. Display a message like "Database folder not available at the moment. Maybe the system was in sleep mode. Shall we try again? OK/Cancel"
In the current version you can tell MM to retry, but it doesn't and produces more errors.

I tested the availability of the NAS and it takes less than 3 seconds until content on the NAS can be accessed again after wake up.

I think the current behavior of MM is a bug. What do you think?
Peke
Posts: 18109
Joined: Tue Jun 10, 2003 7:21 pm
Location: Earth
Contact:

Re: Disk I/O error after PC sleep

Post by Peke »

Hi,
I do not think that is a bug, but as Lowlander explained windows access bug.

Are you using MMW installed portable on NAS or you use custom DB location? Either way can you post path to MM.DB you are accessing?
Best regards,
Peke
MediaMonkey Team lead QA/Tech Support guru
Admin of Free MediaMonkey addon Site HappyMonkeying
Image
Image
Image
How to attach PICTURE/SCREENSHOTS to forum posts
Aff
Posts: 307
Joined: Sun Oct 05, 2008 4:46 pm
Location: Switzerland

Re: Disk I/O error after PC sleep

Post by Aff »

Hi

MMW is installed on the local drive C: in portable mode, MM DB has a custom location on the NAS, DBName=\\nas\Music\!MediaMonkeyDB!\MM.DB
Peke
Posts: 18109
Joined: Tue Jun 10, 2003 7:21 pm
Location: Earth
Contact:

Re: Disk I/O error after PC sleep

Post by Peke »

Hi,
Hmmm. lets make small test?

Can you copy \\nas\Music\!MediaMonkeyDB!\MM.DB to Portable subfolder -> remove custom location and try to replicate. I tried to replicate and only way I can get I/O error is when NAS HDD was a sleep and it takes 5s to spinup and remount shared folder. That behavior is normal as MM tried 100 to access MM.DB.
Best regards,
Peke
MediaMonkey Team lead QA/Tech Support guru
Admin of Free MediaMonkey addon Site HappyMonkeying
Image
Image
Image
How to attach PICTURE/SCREENSHOTS to forum posts
Aff
Posts: 307
Joined: Sun Oct 05, 2008 4:46 pm
Location: Switzerland

Re: Disk I/O error after PC sleep

Post by Aff »

Hi

When the DB is in the Portable folder on the local drive, it works without errors.

What do you mean by "MM tried 100 to access MM.DB"?

When the DB is on the NAS, I get the errors even when the NAS HD wasn't sleeping.
Peke
Posts: 18109
Joined: Tue Jun 10, 2003 7:21 pm
Location: Earth
Contact:

Re: Disk I/O error after PC sleep

Post by Peke »

Hi,
Unfortunately if Local copy works something breaks MMW connection to DB, I meant that MMW tries 100 Times to retry to restore connection and access to DB before throw error.

MMW needs to have constant access to DB as some users have DB sized multiple GB and loading that to memory is not an option due the performance issues.

WiFi connection is unstable on many hardware (which I found out once I bought ASUS RT-AX92U duo Air Mesh set and Switched to WiFi 6(AX) band) which due the cycling of channels and devices can cut connection and takes 1-2s restore it.

Something makes things cutting connection for you.
Best regards,
Peke
MediaMonkey Team lead QA/Tech Support guru
Admin of Free MediaMonkey addon Site HappyMonkeying
Image
Image
Image
How to attach PICTURE/SCREENSHOTS to forum posts
cjnaz
Posts: 5
Joined: Tue May 02, 2017 12:04 am

Re: Disk I/O error after PC sleep

Post by cjnaz »

Nonsense.

Any application that can't gracefully recover from a network outage (after the network is back) has a critical bug (perhaps a design bug). Critical bugs must be high on the list for fixing.

I've used MM for about 10 years on 3 Windows boxes. This same problem has been there all along. On my current machine (Win11 notebook), I get stuck in a forever loop of "Database file ... cannot be accessed. Error: disk I/O error." Dismiss the message and it comes right back. I have to kill the app/process via the task manager, and then its happy with restarting.

In my case the MM5.DB is on a always on file share on my network (samba share from a RHLE9 host).

Inconceivable!
Peke
Posts: 18109
Joined: Tue Jun 10, 2003 7:21 pm
Location: Earth
Contact:

Re: Disk I/O error after PC sleep

Post by Peke »

Hi,
Not sure I understand your point.

eg. if MM tries to: "Please List me #$@%$&%&#@* all ^$@#*#^$ test @#*&@^#$** and delete %$#@!^&%# all @&^%*$#@*&^#$@*&^ files from ^&%$#@&#^%$@&^ RHEL9 Host" I really wonder what you would expect MM to do, because if it removes garbage and execute it is very possible that it would delete all files on "RHEL9 Host". So I would rather throw Error than execute/continue command. Especially if I retry 100 times.
Best regards,
Peke
MediaMonkey Team lead QA/Tech Support guru
Admin of Free MediaMonkey addon Site HappyMonkeying
Image
Image
Image
How to attach PICTURE/SCREENSHOTS to forum posts
cjnaz
Posts: 5
Joined: Tue May 02, 2017 12:04 am

Re: Disk I/O error after PC sleep

Post by cjnaz »

Thank you for your reply. Sorry, I don't follow your example.
"Please List me #$@%$&%&#@* all ^$@#*#^$ test @#*&@^#$** and delete %$#@!^&%# all @&^%*$#@*&^#$@*&^ files from ^&%$#@&#^%$@&^ RHEL9 Host"
I think you're suggesting that after a sleep MM cannot determine if it has a correct connection to the the .DB file, and therefore it could blissfully do damage. Clearly, based on the endless loop of error messages, MM can determine that it has not successfully reconnected the .DB file. To the best of my (user) knowledge, MM is not doing anything when the machine goes to sleep. It would be reasonable to terminate any in-process operations when recovering from sleep, and tell the user that operations were aborted.

I'm saying that MM should be able to correctly reconnect to the .DB file, just as easily as when the application is started. Currently, I have to kill MM via the task manager and then it will start just fine. I deal with no other application that cannot recover from sleep wake-up or a network loss/recovery on Windows or Linux. That's a bug.

At a minimum, it should show the error and give options for terminate or restart, if it cannot successfully recover from sleep.

regards,
cjn
Peke
Posts: 18109
Joined: Tue Jun 10, 2003 7:21 pm
Location: Earth
Contact:

Re: Disk I/O error after PC sleep

Post by Peke »

Hi,
That I agree with you. I was just explaining "visually" why it happens. There is real space to improve and you just give an idea how.

Want to thank you for patience, talk, especially constructive talk always bring better results and improvements.

Will update this topic as soon as I create bug report.

EDIT: Added as https://www.ventismedia.com/mantis/view.php?id=21538
Best regards,
Peke
MediaMonkey Team lead QA/Tech Support guru
Admin of Free MediaMonkey addon Site HappyMonkeying
Image
Image
Image
How to attach PICTURE/SCREENSHOTS to forum posts
cjnaz
Posts: 5
Joined: Tue May 02, 2017 12:04 am

Re: Disk I/O error after PC sleep [#21538]

Post by cjnaz »

Thanks. I'll track the bug report.
I've been in software development for decades. There's no value in being a jerk.

regards,
cjn
Peke
Posts: 18109
Joined: Tue Jun 10, 2003 7:21 pm
Location: Earth
Contact:

Re: Disk I/O error after PC sleep [#21538]

Post by Peke »

cjnaz wrote: Tue Mar 11, 2025 5:04 pm Thanks. I'll track the bug report.
I've been in software development for decades. There's no value in being a jerk.
Exactly, we are lucky to have users to keep us on toes ;)

Happy Monkeying!

I wonder what bandwidth you have and do you observe slowdown when using DB from LAN/WLAN against Local hdd? for me it is big difference on 200k library.
Best regards,
Peke
MediaMonkey Team lead QA/Tech Support guru
Admin of Free MediaMonkey addon Site HappyMonkeying
Image
Image
Image
How to attach PICTURE/SCREENSHOTS to forum posts
Post Reply