Support » Plugin: Custom Content by Country (by One Dollar Plugin) » IP-2 Nations data is not working

  • Hi,

    we can’t install the IP-2-Nations data. When we push the buttom ‘Install’ is not working. The message said please wait, but adter that nothing happen.
    Can you help me?

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • I was able to get around this same problem by increasing the speed of the INSERTs in to ip2nation, there are 65,000+ inserts and many hosts do not have MySQL setup for performance and/or have the timeout on the PHP execution process short enough that only 10,000 or so records get inserted/committed before timing out.

    So, use phpMyAdmin, Adminer, or MySQL WorkBench, find the SQL scripts and run them by hand. For the ip2nation one, you need to add some SQL to turn off checks, commits… this dramatically increases the speed of the query.

    The first 3 lines and last 3 lines are what you are adding, you are wrapping all the INSERTs in commands to turn off unnecessary features that are slowing things down.

    SET autocommit=0;
    SET unique_checks=0;
    SET foreign_key_checks=0;
    
    INSERT INTO ip2nation (ip, country) VALUES(3332724736, 'pm');
    INSERT INTO ip2nation (ip, country) VALUES(3332726783, 'ca');
    ... 60,000+ similar lines ...
    INSERT INTO ip2nation (ip, country) VALUES(1314357247, 'uk');
    
    SET foreign_key_checks=1;
    SET unique_checks=1;
    COMMIT;

    If you want to read up on the commands/settings, go here
    https://dev.mysql.com/doc/refman/5.6/en/optimizing-innodb-bulk-data-loading.html

    • This reply was modified 2 years, 7 months ago by Accuraty.
Viewing 1 replies (of 1 total)
  • The topic ‘IP-2 Nations data is not working’ is closed to new replies.