Best way to handle multiple databases?

22 views
Skip to first unread message

inmn

unread,
Dec 22, 2016, 12:33:05 AM12/22/16
to redbeanphp
We have 3 databases. Write, read, and log.

We're switching between the databases but find inconsistent behavior when doing so. Sometimes write keeps a sleep connection open. Sometimes it doesn't switch and the data goes into the wrong location.

Should we be trying to explicitly close a connection? Or any other way to debug this.

It's only under extreme duress that it fails.

Matthew Frederico

unread,
Dec 22, 2016, 2:58:52 PM12/22/16
to redbe...@googlegroups.com
I'd recommend tuning mysql and your tcp timeouts in the linux kernel of where the server is located so that it doesn't keep connections in time_wait status and other networking performance tuning.  Here is a great article:


--
You received this message because you are subscribed to the Google Groups "redbeanphp" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redbeanorm+unsubscribe@googlegroups.com.
To post to this group, send email to redbe...@googlegroups.com.
Visit this group at https://groups.google.com/group/redbeanorm.
For more options, visit https://groups.google.com/d/optout.



--
-`;'- Matthew Frederico
Reply all
Reply to author
Forward
0 new messages