Comments (21)
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.
Done.
from dir.
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.
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.
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.
I also commented out the DELETE FROM `tag`
query to avoid congestion.
from dir.
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.
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.
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.
Did you measure increased performance before changing fields?
from dir.
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.
Yes and the size of the table was reduced to 8.5 MiB from 517MiB.
from dir.
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.
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.
Which PHP version?
from dir.
PHP Version 7.1.16-1
from dir.
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.
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.
Is that some test code?
from dir.
Looks like some debug code that was committed in the Pear package source.
from dir.
Won't fix.
from dir.
Related Issues (20)
- Dynamic version scoring HOT 5
- Locations Sidebar Results HOT 2
- Support the "account-type" HOT 12
- Remove all Javascript HOT 1
- Add search on tags HOT 2
- health page not working HOT 3
- wrong download link
- Make the maintenance.html page configurable HOT 1
- bug location HOT 2
- Feature list of recommended public servers broken HOT 3
- Server health tests are a little unfair due to absolute timing values HOT 63
- Short statistic on the directory servers HOT 4
- Decentralized Network Clarification HOT 4
- Profiles with censored=1 should not be updated / unblocked by cron_sync.php HOT 16
- Missing isset() calls causing noisy logs HOT 1
- Update Version Check, including partical automation HOT 2
- Missing UNIQUE key for base_url and reduction to normalized URL HOT 4
- Filter for explicit content nodes in Server list HOT 1
- Next version of the directory HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dir.