Giter Site home page Giter Site logo

Comments (21)

AndyHee avatar AndyHee commented on June 16, 2024 3

Wow!!

Converting the tag table to InnoDB made an astonishing difference in terms of performance. We probably should covert the entire DB.

I learned a lot about using phpMyAdmin. It's great!

from dir.

AndyHee avatar AndyHee commented on June 16, 2024 1

Done.

from dir.

MrPetovan avatar MrPetovan commented on June 16, 2024 1

There has been recent alternatives, but none allow to specify the number of packet sent.

It wouldn't be too much work just to suppress this warning. But I feel like it would be a long-term decision, with more surprises along the way. A local workaround might be more appropriate.

from dir.

MrPetovan avatar MrPetovan commented on June 16, 2024 1

I ended up forking pear/Net_ping and I'm using it in the next version of the directory: https://github.com/MrPetovan/Net_Ping

There still is an undefined index issue when the remote server rejects the ping, so it will require a little bit more work.
Also this: https://github.com/pear/Net_Ping/blob/d1f370b3a6072e5a493ed855804d98aadf818fa7/Net/Ping.php#L982-L987

from dir.

MrPetovan avatar MrPetovan commented on June 16, 2024

An initial workaround has been to add a new id auto increment column with a PRIMARY index on it in the sync-push-queue. This requires to change the existing PRIMARY index to UNIQUE before adding the column.

This effectively transforms the table into an actual queue where new items are added to the end of the queue.

The INSERT INTO `sync-push-queue` also has to be changed to REPLACE to avoid duplicate index errors.

from dir.

MrPetovan avatar MrPetovan commented on June 16, 2024

I also commented out the DELETE FROM `tag` query to avoid congestion.

from dir.

AndyHee avatar AndyHee commented on June 16, 2024

So do you recommend a specific setting for the time being to avoid the issue.

Everyone only pulls, but doesn't push?

dir.friendi.ca | 0 | 1 | 1523116804
dir.friendica.social | 1 | 1 | 1525699804
socialdir.isurf.ca | 1 | 1 | 1525697404

from dir.

AndyHee avatar AndyHee commented on June 16, 2024

An initial workaround has been to add a new id auto increment column with a PRIMARY index on it in the sync-push-queue. This requires to change the existing PRIMARY index to UNIQUE before adding the column.

Could you commit those changes to your branch, so we can see in more detail what's changed in the DB?

from dir.

MrPetovan avatar MrPetovan commented on June 16, 2024

I will tonight EST.

Push is interesting for faster contact discovery, but it currently is unbridled. I would recommend to turn it off until you have changed the behavior.

from dir.

MrPetovan avatar MrPetovan commented on June 16, 2024

Did you measure increased performance before changing fields?

from dir.

AndyHee avatar AndyHee commented on June 16, 2024

I didn't exactly measure it, but previously maybe it took about three/ four seconds just to load the directory's main page. It was extremely slow, even from my local network where the server is. Now in a "split second" everything is displayed.

from dir.

AndyHee avatar AndyHee commented on June 16, 2024

Yes and the size of the table was reduced to 8.5 MiB from 517MiB.

from dir.

MrPetovan avatar MrPetovan commented on June 16, 2024

The size drop is explained by the enforcement of a unique key (747000 rows before, 3800 after), the switch from profile nurl to profile id, and dropping the useless id column.

I’m glad it’s faster just by changing the data structure!

from dir.

AndyHee avatar AndyHee commented on June 16, 2024

I've noticed this error in the log.

2018/05/08 23:42:20 [error] 24826#24826: *127814 FastCGI sent in stderr: "PHP message: PHP Deprecated:  Non-static method Net_Ping::factory() should not be called statically in /var/www/directory/include/site-health.php on line 113
PHP message: PHP Deprecated:  Non-static method Net_Ping::_setSystemName() should not be called statically in /var/www/directory/vendor/pear/net_ping/Net/Ping.php on line 141
PHP message: PHP Deprecated:  Non-static method Net_Ping::_setPingPath() should not be called statically in /var/www/directory/vendor/pear/net_ping/Net/Ping.php on line 143
PHP message: PHP Deprecated:  Non-static method Net_Ping_Result::factory() should not be called statically in /var/www/directory/vendor/pear/net_ping/Net/Ping.php on line 404" while reading response header from upstream, client: 163.172.11.188, server: dir.hubup.pro, request: "GET /submit?url=68747470733a2f2f667269656e646963612e78797a2f70726f66696c652f77616e6465726e HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.1-fpm.sock:", host: "dir.hubup.pro"

from dir.

MrPetovan avatar MrPetovan commented on June 16, 2024

Which PHP version?

from dir.

AndyHee avatar AndyHee commented on June 16, 2024

PHP Version 7.1.16-1

from dir.

MrPetovan avatar MrPetovan commented on June 16, 2024

Ugh, this is due to Net_Ping having been written in the previous century.

Either we maintain an updated version of the lib, or we make the calling code uglier.

from dir.

AndyHee avatar AndyHee commented on June 16, 2024

Ahh.. Net_Ping is unmaintained. The last release was written for PHP 4.0.0 almost nine years ago!

I take, it there is no existing alternative, ready for use. How much work would it involve to bring the lib up-to-date?

from dir.

annando avatar annando commented on June 16, 2024

Is that some test code?

from dir.

MrPetovan avatar MrPetovan commented on June 16, 2024

Looks like some debug code that was committed in the Pear package source.

from dir.

MrPetovan avatar MrPetovan commented on June 16, 2024

Won't fix.

from dir.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.