New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiple database connections Broken (Trac #1349) #1349
Comments
cash wrote on 39886548-03-16 These lines demonstrate the problem:
As described in the ticket, $CONFIG->db->split would need to be changed to work. database.php would also have to be updated. This is related to ticket #1377 |
trac user obito wrote on 39891041-10-30 Replying to cash:
Cash, you explain so little, what do i need to do? i renamed "$CONFIG->db->split" to "$Config->connection->split" in both settings.php and database.php and again i got nothing. Please explain what exactly i need to do, this is driving me crazy and would really appreciate it. |
cash wrote on 39892074-02-24 Split databases is not implemented in the core. It looks like early on for Elgg 1.* they were considering it, but I see no evidence it was finished and tested. |
trac user obito wrote on 39892815-10-18 Replying to cash: SELECT m.*, n.string as name, v.string as value from elgg_metadata m JOIN elgg_entities e ON e.guid is slowing down my database, i think i have too many tags and it slows down elgg when they look it up. Does elgg have any solution for this? |
cash wrote on 39896189-05-06 Yes, it is not finished. About your question, this is not a support forum. This ticket is about read/write connections. To find help, I suggest you try the community site. Good luck. |
Milestone changed to |
Milestone changed to |
trac user srokap wrote on 42821723-03-19 Pull request fixing this ticket: #410 |
Based on discussion in #6197, this feature should now be working fine. |
Hello, |
The write connection returns the last insert ID, do we actually do a read between the two inserts? |
As far as I can tell:
|
Let me point out that I have not tested this with the new version. As mentioned above, I experienced this problem in 2008. However, since one of the projects I am working on is planning on using this split DB architecture, I am trying to make sure this was solved. |
Digging more into the code, I think I found my answer: |
Original ticket http://trac.elgg.org/ticket/1349 on 39848636-06-07 by trac user obito, assigned to unknown.
Elgg version: 1.8
In engine/settings.php when you try to use Elggs multiple database feature you get this error
Fatal error: Cannot use object of type stdClass as array in /home/content/07/4688407/html/engine/settings.php on line 58
The problem is the split command it self, when you take out "$CONFIG->db->split = true;" in engine/settings the error is gone.
If you take out or rename "db" out of $CONFIG->db->split = true; the error is gone as well. In order to rename it you have to edit the engine/lib/database.php however even if you rename it or change it, Elgg doesn't split the reads and writes.
The text was updated successfully, but these errors were encountered: