Topic-icon queries to unconfigured providers

Active Subscriptions:

None
10 years 5 months ago #56326 by alex_b
Hello,
I see that JFBConnect starts a query to any providers, included the unconfigured.
This is the query:
SELECT um.* FROM `jos_jfbconnect_user_map` um WHERE j_user_id = '1365053' AND provider = 'yahoo'
I have configured only Facebook and Google, but I see similar queries to vk, windowslive, twitter, linkedin, etc.
Now, I have more than 800k registered users: this huge amount of queries, queued in MySQL, is a real problem.
Is there any option or setup to stop those queries? I have added some indexes to jfbconnect_user_map to reduce the impact of this, but anyway the problem is still critic.
Thank you
The topic has been locked.
Support Specialist
10 years 5 months ago #56330 by alzander
Thanks for the report. We're looking into this. There's a couple of quick notes I can respond with that should help alleviate some of the concern as well as some things I can see we could do better:
1) The query is on our JFBConnect user_map table. I'm assuming all 800k of your users have not registered through a social network, so that table is likely very, very small. It's not going over the main #__users table, which would be much larger.
2) You're correct that we don't have indexes on that table, which surprises the heck out of me. That will be corrected in an upcoming release. Again though, that will only help when you have a large number of users that have connected with a social network only.

With that said, we can't find an instance where all of those queries for each network would be loaded on the front-end under normal circumstances. Can you let me know:
a) Are you seeing those queries on every page load?
b) Is it happening for guests or logged in users? If logged in, how are they logged in: through Joomla or a social network?

Let us know any other details you can about how/when you see those queries and we'll gladly help investigate more. We take performance very seriously and never like to be a bottleneck.

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
10 years 4 months ago #56502 by alex_b
Hi Alex,
thank you for you reply.
about your questions:
1) JFBConnect user_map table is ~141,746 :-)
2) I saw the queries only at login, not for guest (the query includes user ID)

The point is: why is this query perform a search also versus unconfigured providers? I could understand - if Facebook, Google+ and Twitter apps are active - that the component queries also Google+ and Twitter for a Facebook logged in user, to propose him a match with his other social accounts, but why VK, WL o Linkedin?

At the moment, I have partially hacked the component and blocked any requests towards unconfigured providers, but this is only a partial solution (I cannot hack any point that produces the query or the component fails).

Please, let me know
Thank you
Alessandro
The topic has been locked.
Support Specialist
10 years 4 months ago #56511 by alzander

1) JFBConnect user_map table is ~141,746 :-)

That's a big table indeed. You have that many users that have authenticated with a social network on your site? If so, you'd be in the top tier of sites using JFBConnect. Congrats :)

At the moment, I have partially hacked the component and blocked any requests towards unconfigured providers, but this is only a partial solution (I cannot hack any point that produces the query or the component fails).

Honestly, if you're not using the other social networks, you likely can delete the /components/com_jfbconnect/libraries/provider/xyz.php files for each one, like vk.php, windowslive.php, etc. If you're using any features from those networks, like LinkedIn Share, don't delete the file.. but if you have nothing using the network, deleting the file should prevent it from loading.

That's a very dirty solution. We'll have to look into the queries we're doing at authentication to understand why all networks are being queried in that table. I don't have an answer right now as I agree they shouldn't be. If you've done some dirty work already and narrowed down the specific query that's causing the repeatedly look ups, let me know so I can have a jump on things.

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
10 years 4 months ago #56534 by alex_b
Hi Alex,
here: /var/www/cinemaz/administrator/components/com_jfbconnect/models/usermap.php
please check in attached file for: array('facebook', 'google', 'linkedin', 'twitter')

I will delete unused providers files now :-)
Thank you for your support!
Alessandro
usermapphp.zip
The topic has been locked.
Support Specialist
10 years 4 months ago #56568 by alzander
Thanks for the report. We've added this to our to-do list tracker and it will definitely be investigated for the next release. Off-hand, I'm still not sure why we'd request info from each provider, but there's a lot of moving parts, so possible we always missed something.

Alex
The topic has been locked.