1

I am currently running into an issue on PHP trying to upload a video.

It returns an error saying. I am running laravel php on GKE and using nginx-ingress.

I have updated the necessary values in php.ini

upload_max_filesize = 1024M
post_max_size = 1024M
memory_limit = 1024M

I also added the annotations to ingress:

nginx.ingress.kubernetes.io/proxy-body-size

<br />
<b>Warning</b>: POST Content-Length of 61828655 bytes exceeds the limit of 8388608 bytes in <b>Unknown</b> on line
<b>0</b><br />
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8" />
    <meta name="robots" content="noindex,nofollow,noarchive" />
    <title>An Error Occurred: Content Too Large</title>
    <link rel="icon"
        href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 128 128%22><text y=%221.2em%22 font-size=%2296%22>❌</text></svg>" />
    <style>
        body {
            background-color: #fff;
            color: #222;
            font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
            margin: 0;
        }

        .container {
            margin: 30px;
            max-width: 600px;
        }

        h1 {
            color: #dc3545;
            font-size: 24px;
        }

        h2 {
            font-size: 18px;
        }
    </style>
</head>

<body>
    <div class="container">
        <h1>Oops! An Error Occurred</h1>
        <h2>The server returned a "413 Content Too Large".</h2>

        <p>
            Something is broken. Please let us know what you were doing when this error occurred.
            We will fix it as soon as possible. Sorry for any inconvenience caused.
        </p>
    </div>
</body>

</html>

Any idea or help on what i can do to fix this issue? Thanks for the help

1 Answer 1

0
server {
        ....
        client_max_body_size 1024M;
        ....
    }

remember to restart nginx

sudo nginx -s reload

or 

sudo nginx -s restart

Remember to restart php fpm also

Sign up to request clarification or add additional context in comments.

4 Comments

where should i add this? once i add this in the pod and reload, it resets back to default
and i added this to the nginx.conf file
check on ls /etc/nginx/site-enabled/ I want to know your block if is default add on default
but changes must be done on /etc/nginx/site-available

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.