You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I set up a FTP fs_storage, and it works great except that after some time (can be 10 seconds or a few minutes), it is impossible to communicate with the filesystem
When downloading:
When uploading:
If I restart my Odoo instance, it works again.
Like #319, I think the file system expires but is not renewed by Odoo.
Here, the filestore is saved in cache by Odoo.
When I remove the ormcache decorator, the filesystem is created every time, and I don't have any problems.
As mentionned in #319 and #320, with heavy traffic, it is not recommended to fetch the filesystem every time. As it is not my case, I will remove the ormcache decorator while looking for a permanent solution.
The text was updated successfully, but these errors were encountered:
I am still looking for a permanent solution, but here is a little update:
I tried to implement the solutions proposed in #320 for V17, but I still had my issue. I was surprised that the _check_connection method was never called. I figured it was because the file system is mostly accessed through the get_fs_by_code method, which is cached by Odoo's ORM.
I noticed that my issues occur when I'm trying to read/write multiple files at once. My hypothesis is that when doing multiple read/write operations simultaneously through the UI (like drag and drop in the chatter), multiple threads access the same file system (the one in the ORM's cache) at the same time, causing Odoo to freeze. Most of the time, I need to restart my Odoo instance. On Odoo SH branches, the shell also froze, and my only solution was to stop the FTP protocol on the remote server, which made Odoo work again.
Additionally, when I tried to remove the ormcache decorator, I found that the __fs attribute seemed to never be really stored. In fact, in the init method of the fs_storage model, the __fs attribute is set to None. This means that in the fs property, __fs is always generated before doing a check_connection.
Finally, my best shot yet is to do the check_connection in ir_attachment._get_fs_storage_for_code, where get_fs_by_code is called. This way, I can clear the cache and call the method again to have a fresh file store.
I am working on a clean PR that will explain in a better way what I did
Hello!
Module: fs_storage
I think my issue is related to #319, but for V17.
I set up a FTP fs_storage, and it works great except that after some time (can be 10 seconds or a few minutes), it is impossible to communicate with the filesystem
When downloading:
When uploading:
If I restart my Odoo instance, it works again.
Like #319, I think the file system expires but is not renewed by Odoo.
Here, the filestore is saved in cache by Odoo.
When I remove the
ormcache
decorator, the filesystem is created every time, and I don't have any problems.As mentionned in #319 and #320, with heavy traffic, it is not recommended to fetch the filesystem every time. As it is not my case, I will remove the
ormcache
decorator while looking for a permanent solution.The text was updated successfully, but these errors were encountered: