Fixed Concurrency: Target uploaded file already exists, aborting operation

Status
Not open for further replies.
Version
3.12.2
PHP version
7.1.23
Database driver
MariaDB
Database version
5.5.60
Web browser
Firefox 62.0.3

hlx98007

Network license
License owner
Joined
Nov 24, 2017
Messages
6
Likes
2
Points
53
#1
▶🚶‍Reproduction steps
  1. Download 3.12.1 version and setup a Google Bucket correctly (using the old way)
  2. Upload some image (i.e. daylight_1.jpg) and produce an error, internal server error
  3. Upgrade Chevereto to 3.12.2 with the GCS fix.
  4. Fix GCS service account private key section to JSON format
  5. Upload the same image again (daylight_1.jpg)
😢Unexpected result

Concurrency: Target uploaded file already exists, aborting operation

📃Error log message

2018/11/08 20:23:38 [error] 6793#0: *28499 FastCGI sent in stderr: "PHP message: Concurrency: Target uploaded file already exists, aborting operation" while reading response header from upstream, client:


I have an idea that file was not properly cleaned up somewhere, but I have no idea where to find the file in the cache/temp system?
 

Rodolfo

Chevereto Guru-Guru
Staff member
Joined
Oct 7, 2008
Messages
16,134
Likes
4,177
Points
237
Location
Chevereto HQ
Website
rodolfoberrios.com
#2
The concurrency error is triggered when the temp file is still there shortly after previously upload the alleged image.

The file (temp) should be deleted immediately after successfully uploading, but some file systems are heavyly cached, way beyond the realm of usable.

I will try to improve the detection, but if the fs is too slow there's very little left to optimize here.
 

Rodolfo

Chevereto Guru-Guru
Staff member
Joined
Oct 7, 2008
Messages
16,134
Likes
4,177
Points
237
Location
Chevereto HQ
Website
rodolfoberrios.com
#3
Ok, did some research and I discovered a different bug 😂. But hey, good news is that turns out that it could help to fix this issue.

Problem is, that the Storage::getStorageValidFilename is not working at all and it is not getting unique names from the database, a silly bug on my end there. Can't point out since when this is going on, easily, years.


Anyway, the patch will be released in the next revision 💪
 
Status
Not open for further replies.