# Cells 4.0.0 gets confused when a former directory is deleted and replaced with a file with the same name (Mac user here!) \[solved\*\]

**URL:** https://forum.pydio.com/t/cells-4-0-0-gets-confused-when-a-former-directory-is-deleted-and-replaced-with-a-file-with-the-same-name-mac-user-here-solved/4736
**Category:** Pydio Cells
**Created:** [October 17, 2022, 1:45am UTC](https://forum.pydio.com/t/cells-4-0-0-gets-confused-when-a-former-directory-is-deleted-and-replaced-with-a-file-with-the-same-name-mac-user-here-solved/4736 "2022-10-17T01:45:36Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![GwynethLlewelyn](https://yyz2.discourse-cdn.com/flex032/user_avatar/forum.pydio.com/gwynethllewelyn/32/2419_2.png) [@GwynethLlewelyn](https://forum.pydio.com/u/GwynethLlewelyn)
#### Post date: [October 22, 2022, 7:58pm UTC](https://forum.pydio.com/t/cells-4-0-0-gets-confused-when-a-former-directory-is-deleted-and-replaced-with-a-file-with-the-same-name-mac-user-here-solved/4736/2 "2022-10-22T19:58:48Z")

</div>

I’m marking this as ‘solved’ with some caveats…

This _very strange_ behaviour was actually creating conflicts all over the place, namely, for some very weird reason, it managed to exhaust _all system handles_ (file handles, socket handles, Internet socket handles, everything). Granted, the system didn’t stop working: the main daemons had already grabbed their fill of such handles and could happily work with the amount they got. Things would just start to misbehave when something _new_ required a handle for some purpose — a typical example: making a DNS request, for instance. It would fail mysteriously. At the application level it wouldn’t be clear _what_ had failed; the application would just be told that the operating system couldn’t create that particular socket (or file, or whatever).

Retrying a bit later would mysteriously succeed again… for a while… then stop working. This was a new situation, which I had never experienced before. Running out of _file_ handles, well, yes, I had seen that once in a while — the errors are not so mysterious and clearer to read. Running out of sockets… well… I certainly expected a clearer error, being logged _somewhere_ — a bit more than ‘authentication failed’ or ‘could not resolve IP address’ or ‘could not find file’.

Note that this is an oversimplification — there is actually something much deeper going on, namely, why some applications didn’t seem to be affected, while others (such as Cells or Postfix) do, and others still get _partially_ affected, in the sense that they get an unknown error, wait a bit, a handle becomes available, retry, get a positive answer, and releases the handle for other processes to use. Things like, say, PHP-FPM, for instance, would gracefully deal with the situation — they might fail to respawn an instance to handle a request, but that would be ok, the monitor would just kill that instance (thus releasing a few handles back) and try again (with luck, _this_ time it would work).

Miraculously it could be traced to the issue on this thread. It doesn’t seem to bear any relation whatsoever with it, but… once I removed the storage and created it from scratch without the former-directory-now-files entries, everything went back to normal. _Everything_.

Why? Well, I seriously suspect a relationship with the ‘other’ issue I reported: [Cells 4.0.0 RC is constantly writing memory-mapped files to disk, even when nothing is happening - #2 by GwynethLlewelyn](https://forum.pydio.com/t/cells-4-0-0-rc-is-constantly-writing-memory-mapped-files-to-disk-even-when-nothing-is-happening/4735/2)

It still baffles me, though 🙂

But I’m glad that it’s ‘fixed’ in my case now (even though I’m not sure _why_), and maybe this thread might be useful to someone else in the future, who knows…

---

_[View the full topic](https://forum.pydio.com/t/cells-4-0-0-gets-confused-when-a-former-directory-is-deleted-and-replaced-with-a-file-with-the-same-name-mac-user-here-solved/4736)._
