Why do I have multiple connections?

achartier

Administrator
Staff member
I notice that for some reason the number of connections seems to grow. I notice this most when I restore a copy of my production site to my test bed. I have not created these myself. I am leery of deleting them as there may be db items that point to them.

Are they there for some reason?
 
when I restore a copy of my production site to my test bed
How?
If you didn't create any connection there should only be one: with id=1, pointing to the Joomla database.
Have a look at #_fabrik_lists: all entries should have connection_id = 1, in this case you can delete all other connections (backup before).

If you are copying sites you always have to open and resave this connection to make sure it's fetching the actual Joomla DB parameters.

If you got more then one entry in Fabrik connections I assume you have imported the table without dropping or truncating the existing one.
Do you have also duplicated entries in the other #_fabrik_xxx tables?
 
I always use akeeba for my backup and restores and I always reset the connection as soon as I do the restore. I have never restored on my production site but I have 5 connections. I have gone through and set the connection number to 1 in all my lists and trashed all the other connections. Will monitor to see if any more show up.
 
You have 5 connections on your production site?
So they have not been created during the restore process?
And you have (had) lists with connectionId != 1 on your production site?
 
Yes, correct and correct. When I did the list update I had 6 lists with connection number 5. Interestingly they were the full calendar vis lists and a couple of others. I did not set the connection when I created the lists.

Correction to the first item, yes I did but I do not have any now after updating the connection IDs in the lists and trashing the unneeded connections.
 
I have seen this on one other site, who also used Akeeba. I'm still puzzled as to how this happens, and have no working theory at the moment. We'll just need to keep an eye on it, and conduct a thorough post mortem next time it happens.


Sent from my HTC One using Tapatalk
 
I've had this on a couple of sites and have yet to pin point why and how it happened. I usually ditch them all, check they are cleared in phpmyadmin and then create a new one.

If you are only using the one database then it's quite easy to check they are all pointing to only the one connection id using something like phpmyadmin. Just select your #_fabrik_lists table and you will see a field called connection_id. Just point all your lists to the same id and then under connections within fabrik delete anything that isn't that id.
 
It's not only Fabrik lists but also dbjoin element, viz, scheduled task, plugins which may use other connections.

gesendet mit Tapatalk
 
Hmmm.. well so far so good with changing the lists. I will have to keep a close eye to see if anything else starts to complain now that I have purged the extra connections.
 
@felixkat:
The problem is not "one database". You can have multiple connections all pointing to the same database (although for Fabrik these would be "different" ones and may break if you use e.g. one connection for the list and an other one in a dbjoin).

If multiple connections are "just growing" I assume they are all pointing to the same database.

@achartier:
You can search in #_fabrik_xxx.params for e.g.
WHERE`params`LIKE '%connection":"5%'
 
I also get multiple connections to the same database. Without restoring anything.
Although I cloned the fabrik website to another location and somehow fabrik added the alternate location database connection to the original site as well.
But since then, I went and deleted all other connection accept for the first one. However I see now there's like 6 of them again all connecting to the same database.

I dunno, I just unpublish them now and confirm everything is working. When asked somewhere else for the connection when I use any of the others, there's just no data in them even though it's connecting to the same db.

I don't see any clear answer here though?

Regards,
Ettienne
 
Although I cloned the fabrik website to another location and somehow fabrik added the alternate location database connection to the original site as well.
The original site got a new connection with the db params of the cloned site? What are the connection settings in the cloned site? I assume both sites are on the same server (so both databases accessible from both sites? same dbuser params?)
 
Although I cloned the fabrik website to another location and somehow fabrik added the alternate location database connection to the original site as well.

When you cloned it, did you edit the default site connection and save it one time, to pick up the new database details from J!, before you did anything else? If not, it's entirely possible Fabrik could have been using the original connection. Remember, if you clone the #__fabrik_connections table, that site default connection is going to be pointing to the original database, until you change it to the new details (which will happen automatically when you edit/save it).

-- hugh
 
wow quick replies! o_O

Cheesegrits, yes you're correct. I clone everything one time with Installatron applications installer.
I think I'll just disable/unpublish fabrik completely before doing any clones of the site. Then just re-enable fabrik again afterwards.

Troester, correct the connection settings are both localhost and located in same cp account, only the db name & db pass differs.

But yeah I renamed the default connection label and now I don't see any additional connection being generated.

Thanks for the open support guys. :)

Regards,
Ettienne
 
The most important thing is to remember to edit and save the default connection one time, before you do anything else in Fabrik on the cloned site. When you open the default for edit, we compare it against the main J! connection, and if it is different, we offer to update the Fabrik connection to match it.

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top