Hello Mary, Thank you for your reply.
The app.yaml file already includes "/*tmp*" for both "*VIEW_COMPILED_PATH*" and "*APP_STORAGE*". For more permanent files, we're already using Cloud Buckets. What Laravel is trying to do is store compiled views (which are *temporary* files) onto "/*workspace*/storage/framework/views/". However, from app.yaml we already set "VIEW_COMPILED_PATH" as *tmp*, why is the code still trying to save onto the "*workspace*" directory? I need to emphasize again that this project has been working fine for more than a year on app engine and it started breaking only 2 weeks ago. I appreciate the links you shared but if you read the problem carefully you'll see that the links do not address our issue. With the above in mind, can you please direct us towards a solution? On Wednesday, August 26, 2020 at 12:13:31 AM UTC+3 Mary (Google Cloud Support) wrote: > Hello Hadil, > > Yes that is correct. Since App Engine Standard the disk is read-only[1] > with the exception of the /tmp directory, the app.yaml file will be need > modified for the APP_STORAGE to reflect /tmp as you have mentioned. If > these are static files that Laravel needs to retrieve you can use a Cloud > Storage bucket to store them. There is an open source Laravel Google Cloud > Storage Package[2] which can help you with this. More information can be > found on how to configure Laravel with the above package[3]. Please be > aware since this package is open source, it is not supported or endorsed by > GCP. > > [1] > https://cloud.google.com/appengine/docs/the-appengine-environments#comparing_high-level_features > [2] https://github.com/Superbalist/laravel-google-cloud-storage > [3] > https://stackoverflow.com/questions/57177524/laravel-how-to-access-stored-image-from-google-cloud-storage-using-php-laravel > > On Tuesday, August 25, 2020 at 8:02:02 AM UTC-4 [email protected] > wrote: > >> Also, something else worth noting is that we're not sure why Laravel is >> trying to the write to the folder "/*workspace*/storage/framework/views/" >> instead of "/*tmp*/storage/framework/views/". Also, in case it's helpful >> to someone, below is a copy of our app.yaml (it's been configured the same >> way for over a year): >> >> APP_KEY: XXX >> APP_URL: 'XXXXX' >> APP_NAME: XXX >> APP_STORAGE: /tmp >> APP_ENV: production >> APP_DEBUG: true >> VIEW_COMPILED_PATH: /tmp >> >> On Monday, August 24, 2020 at 7:02:51 PM UTC+3 Hadil Charafeddine wrote: >> >>> Hello, >>> >>> Our team has been using App Engine Standard for this project (PHP and >>> Laravel 5.8.38) for over a year now without any issues with deployment. >>> However, a couple of weeks ago we started getting a 500 HTTP error every >>> time we deploy (with and without --no-promote option). >>> >>> When we check our logs, we find that the error is caused by: >>> *2020/08/18 06:15:15 [error] 25#25: *2 FastCGI sent in stderr: "PHP >>> message: PHP Fatal error: Uncaught ErrorException: >>> file_put_contents(/workspace/storage/framework/views/c1b305dfa33e081e1fc836f46439e09f829e8770.php): >>> >>> failed to open stream: Read-only file system* >>> >>> It's very weird that we're receiving this message now even though the >>> project has been working fine for more than a year and we've made countless >>> deployments to date without this issue. Furthermore, we did not update the >>> configuration of the project nor did we update the Laravel version. >>> >>> What's even stranger is that over the past couple of weeks, 95% of the >>> deployments fail with 500 error and 5% succeed without issues. What's also >>> strange is that our team is comprised of 4 developers and 3 of us have 95% >>> unsuccessful deployments while one of has has 100% *successful* >>> deployments. There's absolutely no difference between the code the 3 of us >>> are trying to deploy and the code the 4th member is successfully deploying. >>> >>> This inconsistency is the error is baffling us. We've tried all the >>> solutions online we can find but nothing is working. >>> >>> Can anyone offer any insight on why this could be happening? Please keep >>> in mind that this issue started only 2 weeks ago. >>> >> -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/46f9e53a-8cb3-4bdf-8e9f-015f3c09309bn%40googlegroups.com.
