Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

revert adjustment of tempdirectory #2868

Merged
merged 1 commit into from
Jun 26, 2023
Merged

Conversation

szaimen
Copy link
Collaborator

@szaimen szaimen commented Jun 26, 2023

Supercedes #2856

Address #2924

Motivation: we introduced this tempdir setting initially in order to make big file uploads more reliable. However later on we found out that inside containers usually no tmpfs is used by default which would come with limitations in regard to the max size. Additionally, setting this to the datadir comes with drawbacks like performance problems and symlink problems. So better to just revert this setting and use the default.

@szaimen szaimen added 3. to review Waiting for reviews enhancement New feature or request labels Jun 26, 2023
@szaimen szaimen added this to the next milestone Jun 26, 2023
@szaimen szaimen mentioned this pull request Jun 26, 2023
@szaimen szaimen force-pushed the enh/noid/revert-tempdir-adjustment branch from dd09d1f to 787a902 Compare June 26, 2023 13:19
Signed-off-by: Simon L <szaimen@e.mail.de>
@szaimen szaimen force-pushed the enh/noid/revert-tempdir-adjustment branch from 787a902 to dfe6bd5 Compare June 26, 2023 13:21
@szaimen
Copy link
Collaborator Author

szaimen commented Jun 26, 2023

@ralphte does this look good to you? :)

@ralphte
Copy link

ralphte commented Jun 26, 2023

@ralphte does this look good to you? :)

Looks good here

@szaimen
Copy link
Collaborator Author

szaimen commented Jun 26, 2023

Thanks for the review! :)

@szaimen szaimen merged commit 1354243 into main Jun 26, 2023
@delete-merged-branch delete-merged-branch bot deleted the enh/noid/revert-tempdir-adjustment branch June 26, 2023 15:40
@CoderTobi
Copy link

Hi, so if I understand this right, the tmpdir will be inside the container again in future versions, right? But I think that might cause some problems again during big uploads over the windows client. From what I have read this was also the reason why it was placed in the datadir in the first place.

@ralphte
Copy link

ralphte commented Jul 14, 2023

Hi, so if I understand this right, the tmpdir will be inside the container again in future versions, right? But I think that might cause some problems again during big uploads over the windows client. From what I have read this was also the reason why it was placed in the datadir in the first place.

This all depends on how big of a file you upload. The problem is that the temp dir is used for more than just uploads; more importantly, it creates and deletes many small files. The temp folder should be on an SSD and not a platter disk. This is only an issue if you have two drives, one for your OS and one for your files. In any case, you should have enough available storage on the OS drive with docker to support your largest single file upload. The Nextcloud will look to move that file to the primary storage as soon as it can. If your biggest upload file is 10GB then 15GB of extra space should easily handle the task. This amount of extra space should not be a big deal.

@JMarcosHP
Copy link
Contributor

I would recommend to maintain the temp directory inside the container as default, but write a doc file explaining how to manually change this because many users have different use cases and only suggest this in case the users need to deploy the AIO for production or a dedicated server with hundred connections/uploads per day.

Setting the temp directory inside the container makes sence for a personal use case or deployment for like 5 or 10 users.

But forcing this configuration to all kind of situations is not a good idea.

Dedicated servers always have separate drives for user data and fast drives for cache and temp files. In this case, having this extra documentation makes more sence.

To make this possible, currently the Mastercontainer has an environment variable to mount extra drives NEXTCLOUD_MOUNT the user just need to specify the directory where all his mounted drives reside including the dedicated drive for cache/temp files. Then make a directory inside that drive and set the respective configuration inside the nextcloud container on config/config.php, /usr/local/etc/php/conf.d/nextcloud.ini and /usr/local/etc/php-fpm.d/www.conf. Finally add the respective ownership to www-data in the mounted folder and restart the container.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants