Replies: 2 comments
-
There's a proof of concept on the Symfony bridge where the kernel is booted into memory only once when using See the release note: https://github.com/brefphp/symfony-bridge/releases/tag/0.2.0 This should keep the connection to the DB alive though I haven't tested it's actually the case. If you use Symfony, feel free to give it a try and see if it works for you. Either way, please report back so it might help others 🙂 |
Beta Was this translation helpful? Give feedback.
-
Also I feel it's important to note that AWS recommends that generally, but if your application doesn't get a huge traffic/huge scale, then you can also not do that and run PHP as usual. Many users are not bothering with that, and I think it all depends on the application. Just like AWS might recommend using DynamoDB instead of MySQL: MySQL is fine for many projects. |
Beta Was this translation helpful? Give feedback.
-
AWS Lambda best practices recommends creating database connections outside of the handler method so that new connections aren't created upon every invocation. Has anyone successfully accomplished this with bref, or know for certain whether or not it is even possible? It seems that no matter what I do, new db connections are created upon every invocation.
Beta Was this translation helpful? Give feedback.
All reactions