Slow response and 403 #1848
Replies: 4 comments 1 reply
-
A more readable stack trace:
and
|
Beta Was this translation helpful? Give feedback.
-
Thank you for following up.
I believe I am, composer says:
This is the one. ; See https://github.com/brefphp/bref/blob/master/runtime/layers/fpm/php.ini for defaults.
; Enable extensions
extension=intl
extension=apcu
; extension=openssl
; Not needed as we use Redis internally in Lambda, possible fallback.
; Session configuration
; session.save_handler = redis
; session.save_path = ${REDIS_SESSION_URL}
; Lambda is not compatible with this behaviour.
; See https://github.com/brefphp/bref/commit/a45dcfffb7c575175e67b21cd7bdf415206f9f1f
disable_functions = fastcgi_finish_request ; Bref's default.
; PHP Core
date.timezone = "America/Denver"
default_charset = "UTF-8"
default_mimetype = "text/html"
ldap.max_links = -1
request_order = "GP"
variables_order = "GPCS"
short_open_tag = Off
; Memory limit is set via Symfony/Composer/Lambda, no need to limit here.
memory_limit = 512M
; Database driver config
pdo_mysql.cache_size = 2000
; No cache will be used as Lambda does not have persistent storage.
soap.wsdl_cache_enabled = 0
opcache.enable = 0 ; Does not work locally, Bref uses it.
; Errors config, should be passed as env var
display_errors = ${PHP_DISPLAY_ERRORS}
display_startup_errors = ${PHP_DISPLAY_STARTUP_ERRORS}
log_errors = On
log_errors_max_len = 1024
file_uploads = On
html_errors = On
I don't believe so, this are the terraform variables used to compose the lambda service:
Terraform is creating the zip that gets uploaded to S3
I do not believe to be the case but as I mentioned I am still not 100% familiar with this codebase. Anything specific that I should look for?
Unfortunately the project is not using serverless but terraform. I stared at those files many times and I couldn't spot anything wrong. From word of mouth this project was previously running on EC2 and later migrated to Lambda/Bref and this error has always been there and ignored.
Yes to both
I tried to do that by downloading the lambda zip, modifying its content, zipping and uploading again but unfortunately the lambda crushes entirely with the following error (even if I do not modify it at all):
Unfortunately the dependencies are downloaded from the Github action script so it is tricky to inject my own debugging in the vendor folder. Thank you a lot for helping! |
Beta Was this translation helpful? Give feedback.
-
The last point of uploading to lambda manually is now resolved, I was probably forgetting to zip some dotfile. I am adding |
Beta Was this translation helpful? Give feedback.
-
Thanks to the support of @mnapoli we were able to figure out the issue. That was using the |
Beta Was this translation helpful? Give feedback.
-
I have two issues that are possibly related but I am not 100% sure they are.
I looked up that 403 and I couldn't find anything really helpful (I am aware of issue #385 and my payload is really not big at all). This error also happens on the default 404 generated by Symfony. Again, I get a response on the client and the error is silently ignored.
Kernel
I tried to play with bothgetCacheDir
andgetWritableCacheDirectories
with no luck.I also enabled Sentry to see if I could gather more info but there is not a lot to go by there:
Sentry doesn't seem to be aware of the error 1. at all.
A bit of context:
php-81-fpm
toarn:aws:lambda:us-east-1:534081306603:layer:php-83-fpm:31
and getting the same behaviorI have been stuck on this for days now and any help is greatly appreciated! Thank you!
Beta Was this translation helpful? Give feedback.
All reactions