Image files suddenly missing from local file directory folder

0
Hello. We’ve been testing an application locally for a short while now and have encountered a problem where files in the project suddenly disappear. When creating a profile, we can add a profile picture to it. This is done via a specialization of the System.Image entity. However, after a random amount of time (can be days, can be weeks), we notice that the association is still there and all the data of this image is also still in the database (Thumbnail. name, size, associations, etc.), but the system can’t find the file anymore. We get the following error: The file '180888cddd787c829634da.jpg' could not be found. -------- com.mendix.storage.FileNotFoundInStorageException: LocalFileSystemStore:: File does not exist for key: bd630536-ab22-4667-a88b-778f7bdeb5ec at com.mendix.storage.localfilesystem.internal.LocalFileSystemStore.getFileDocumentAsFile(LocalFileSystemStore.scala:167) at com.mendix.storage.localfilesystem.internal.LocalFileSystemStore.getStoredSize(LocalFileSystemStore.scala:173) at com.mendix.storage.localfilesystem.internal.LocalFileSystemStore.getContentLength(LocalFileSystemStore.scala:177) at com.mendix.filedocumentprocessor.internal.FileDocumentProcessorImpl.getFileDocumentFileLength(FileDocumentProcessorImpl.java:110) at com.mendix.filedocumentprocessor.internal.FileDocumentProcessorImpl.getImageFileLength(FileDocumentProcessorImpl.java:125) at com.mendix.webui.requesthandling.FileDownloadHelper.getContentLength(FileDownloadHelper.scala:199) at com.mendix.webui.requesthandling.FileDownloadHelper.doDownload(FileDownloadHelper.scala:54) at com.mendix.webui.requesthandling.FileDownloadHelper.handleDownload(FileDownloadHelper.scala:39) at com.mendix.webui.requesthandling.FileRequestHandler.handleRequest(FileRequestHandler.scala:47) at com.mendix.webui.requesthandling.FileRequestHandler.processRequest(FileRequestHandler.scala:33) at com.mendix.externalinterface.connector.RequestHandler.doProcessRequest(RequestHandler.java:35) at com.mendix.external.connector.MxRuntimeConnector.lambda$processRequest$0(MxRuntimeConnector.java:74) at com.mendix.util.classloading.Runner.withContextClassLoader(Runner.java:19) at com.mendix.external.connector.MxRuntimeConnector.processRequest(MxRuntimeConnector.java:73) at com.mendix.basis.impl.MxRuntimeImplBase.processRequest(MxRuntimeImplBase.java:834) at com.mendix.m2ee.appcontainer.server.handler.RuntimeServlet.service(RuntimeServlet.java:42) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:791) at org.eclipse.jetty.servlet.ServletHandler$ChainEnd.doFilter(ServletHandler.java:1626) at org.eclipse.jetty.websocket.server.WebSocketUpgradeFilter.doFilter(WebSocketUpgradeFilter.java:228) at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193) at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:548) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1624) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1435) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:501) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1594) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1350) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) at org.eclipse.jetty.server.Server.handle(Server.java:516) at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:388) at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:633) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:380) at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:279) at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311) at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105) at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129) at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:383) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:882) at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1036) at java.base/java.lang.Thread.run(Thread.java:834) When we then look in our file explorer, the file itself has been removed but all of its data is obviously still in the database. So we haven’t performed any sort of delete action inside of the app, otherwise we wouldn’t still have the data. Does anyone know what the cause of this issue could be? Could it perhaps be a restriction on the local file storage of Mendix that it for example removes certain files after a certain time to limit the file storage size? Couldn’t find anything in the documentations about this. Any help or insights would be appreciated!
asked
2 answers
0

This should not be happening and you might want to create a support ticket for this. Assumption is that you are using the Mendix cloud then you can try to debug furhter by downloading full backups of your environment. Try to find the filedocument object in the postgres database. The __uuid__ will correspond with the filename in files directory of your backup. So you can at least try to trace back when this is happening. But normally in the Mendix cloud files only dissappear if something in your model deletes the file. But then the record in the system.filedocument would also be changing.

If you are not in the Mendix cloud check the server for actions that might delete files in the deployment files directory of your project.

Regards,

Ronald

 

answered
0

i have exactly the same problem like you with a profile picture. is this already solved?

answered