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

[DEPLOYMENT] Problem increasing upload size #671

Open
Kulturserver opened this issue Jan 20, 2025 · 10 comments
Open

[DEPLOYMENT] Problem increasing upload size #671

Kulturserver opened this issue Jan 20, 2025 · 10 comments

Comments

@Kulturserver
Copy link

Kulturserver commented Jan 20, 2025

Describe the issue
Although we increased the uploadlimit serverwise, we aren't able to upload images or files larger than 2 MB via our open form installation

Deployment Environment

  • OpnForm Version: latest
  • Hosting Platform: [Self-hosted server]
  • OS: [Linux 6.1.0-30-amd64 Debian 12]

Deployment Method

  • Docker

Steps Taken
Describe the steps you've taken to deploy the application:

  1. following docker installation guide
  2. run .env scripts
  3. created own domain

Error Messages
This error is seen in the inspector when trying to upload a large file (forms-dev.culturebase.org being the domain we set up): Bk3RVgqs.js:19
POST https://forms-dev.culturebase.org/api/upload-file 422 (Unprocessable Content)

Configuration Files
If relevant, provide snippets of your configuration files (make sure to remove any sensitive information).
client/.env:
NUXT_PUBLIC_APP_URL=https://forms-dev.culturebase.org
NUXT_PUBLIC_API_BASE=https://forms-dev.culturebase.org/api
NUXT_PRIVATE_API_BASE=http://ingress/api
NUXT_PUBLIC_ENV=dev
NUXT_API_SECRET=***

Logs
To help us diagnose the issue, please provide the following logs:

  • laravel.log in api/storage/logs on the back-end image

  • Nuxt logs in the client docker logs

  • those are both empty, we cannot find them

Additional context
we checked with the existing issues #570 and followed the steps there, but with no result

@JhumanJ
Copy link
Owner

JhumanJ commented Jan 20, 2025

Hey, 422 is a validation error. Any content/payload in the response?
By default the limit should be of 50mb and we don't currently offer a way of changing this in the self-hosted version

@Kulturserver
Copy link
Author

I see this in the response: Bk3RVgqs.js:14 Hydration completed but contains mismatches.

And 50MB is fine with us, but somehow everything larger than 2MB seems to get blocked, smaller files/images work fine.

@Kulturserver
Copy link
Author

Is this the information you needed? Let me know, if you need more.

@JhumanJ
Copy link
Owner

JhumanJ commented Jan 21, 2025

Hey can you please take a look at this post on our Discord: https://discord.com/channels/1203373199765545000/1203373200218791947/1310762475129671781

Image

@Kulturserver
Copy link
Author

Thanks for the reply - we already enhanced that and restarted the docker and nginx accordingly, but unfortunately it didn't fix the issue.

@Kulturserver
Copy link
Author

Do you have any other suggestions? Any help would be highly appreciated - thanks in advance!

@JhumanJ
Copy link
Owner

JhumanJ commented Jan 30, 2025

Hey @Kulturserver I just updated the docker images and setup. This can maybe make things easier (there's a php.ini file that can be changed)

Can you please share more details about the request/response etc?

@Kulturserver
Copy link
Author

Thanks for the reply! Unfortunately, we run into a new problem when trying to install the new image.

We deleted everything and updated the git repo in /opt/opnform
if we call docker-compose up -d it stops after a short while:

Building ui
Sending build context to Docker daemon 26.82MB
Step 1/12 : FROM node:20-alpine AS javascript-builder
20-alpine: Pulling from library/node
1f3e46996e29: Pull complete
280cf903519d: Pull complete
3e4c58ea8b08: Pull complete
f5c4456c2e24: Pull complete
Digest: sha256:2cd2a6f4cb37cf8a007d5f1e9aef090ade6b62974c7a274098c390599e8c72b4
Status: Downloaded newer image for node:20-alpine
---> f97665f3387c
Step 2/12 : WORKDIR /app
---> Running in 86a2f3e41d44
Removing intermediate container 86a2f3e41d44
---> 533076395bec
Step 3/12 : ADD ./client/package.json ./client/package-lock.json ./
---> 36e20d9d7d7d
Step 4/12 : RUN apk add --no-cache git
---> Running in 7d5cf9b6cca5
fetch https://dl-cdn.alpinelinux.org/alpine/v3.21/main/x86_64/APKINDEX.tar.gz

Here it stops, the fetch doesn't get finalized. Are there any suggestions? Thanks in advance!

@JhumanJ
Copy link
Owner

JhumanJ commented Feb 4, 2025

It seems like you're rebuilding the image instead of using the one on docker hub - any reasons why?
We included a script to help you get started here: https://docs.opnform.com/deployment/docker

@Kulturserver
Copy link
Author

Thank you very much - we will look into this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants