3 ms·
This is one of the reasons where PHP makes stuff so complicated. Django out of the box its 1 flag to keep connections alive. I assume most other languages as w
by brianwawok 10y ago
This is one of the reasons where PHP makes stuff so complicated.
Django out of the box its 1 flag to keep connections alive. I assume most other languages as well.
You CAN do it the right with with PHP if you use a bunch of other products, but you are making life so much harder than it needs to be ;(
- CaveTech 10y agoPersistent connections are far more complicated to reason about. I believe what you mean is that this makes it more difficult to scale PHP, which is arguably true, but at the same time it forces you to understand underlying concepts.
- brianwawok 10y agoConnection pooling is fairly understood at this point in time...
- junker101 10y agoIt's typically 'SESSION' specific things with connection pooling that I've seen underlying (sometimes long-uncaught) bugs in production systems. e.g. A 'ALTER SESSION'/'NLS_DATE_FORMAT' commands in Oracle or even an unfortunate 'USE <db>' w/MySQL. There are of course safe solutions & techniques for this, but when you have an otherwise stateless-by-design codebase (such as with PHP), picking up "possibility state-laden" connections is a bit of an unexpected concept that I've seen catch developers more than once.
- brianwawok 10y agoThat seems a terrible idea. Don't do that!