Upload a doc lasts 24s (whatever the file size)

Hi all :wink:

Strange behavior here with my new dolibarr install…

Dolibarr 9.0.1, PHP7.3 & Nginx 1.14.2

Whatever the size of the file, an upload always lasts 24s

A 5Ko or 500 Ko file upload always lasts precisely 24 s :happy:

All others operations have no speed concern.

Definitly not a speed link problem. On a another VM (on the same server) with Dolibarr 5.0.2, PHP 5.6 & Nginx 1.12.2, the upload is just blazing fast :happy:

Nginx and PHP setup between the two VM is the same. The VM setup are identical. Search the web without success.

Maybe a problem around nginx & php-fpm… don’t know… I have a lot of VM with a lot of WP or Dolibarr in production, without any probem.

But this one is the first with Dolibarr 9 and PHP 7.3.

It’s definitely a stupid thing…

Ideas are very welcome :wink:

All the best from Oléron Island - France

Does this assumption hold true? e.g. Is the server itself a Virtual Server?

Hi Peter.

No, the server is a real piece of big hardware, with a lot of xen vm inside.

Laurent has pointed out the problem.

It was a clamscan problem…

Here’s a copy of my answer on the Dolibarr ML…

All the best from here.

Stef

============================================
Hi Laurent

> Check in setup - security if you have enabled an antispam tool executed after each upload and try to disable it if you have it.

I know you know you’re definitly the best but it’s worth repeating :happy:))

Many thanks for pointing out the problem. I had already stopped the clamav service, but without thinking about a direct invocation from Dolibarr. I’m stupid :happy:

The next step should be why theses 24 s… To dig around that I made a little test :

With this 12K file : 20181121 - DBOOKER - SOW - manuels dolibarr.pdf

11:08-root@domu210:/srv/doc/erp1.soweb.io/admin/temp>/usr/bin/clamscan “20181121 - DBOOKER - SOW - manuels dolibarr.pdf”

20181121 - DBOOKER - SOW - manuels dolibarr.pdf: OK

----------- SCAN SUMMARY

Known viruses: 6107219
Engine version: 0.100.2
Scanned directories: 0
Scanned files: 1
Infected files: 0
Data scanned: 0.03 MB
Data read: 0.01 MB (ratio 2.33:1)
Time: 22.591 sec (0 m 22 s)

So I retrieve (approx.) my 24 s…

Adding --debug shows all the clamscan (still slow) work against its signature database. I’ve searched the web with no results, except seeing many people complain about clamscan is now far more slower than in old days…

All the best from Oléron Island :happy:

Hi all…

Finally fix this.

This is definitly not a clamscan problem but a user misunderstanding :slight_smile:

The right way is to avoid clamscan (a standalone program loading the entire virus base each time) and instead use clamdscan, the client side of clamscan-daemon, which of course has to be running.

clamscan-daemon loads the virus table one time at start or after a virus base update.

Then the right command line is /usr/local/clamdscan --fdpass

–fdpass is mandatory (to bypass socket rights).

Hope this helps !