TheDreamer's avatar

FTP upload queue doesn't work with Redis

Hi, I have a problem with an application I'm currently building and can't get my head around why it isn't working.

It creates a queue to convert images and uploads them with FTP to another server. Everything is working fine as long as I'm using the queue sync connection (QUEUE_CONNECTION=sync), but as soon as I switch to Redis my upload method returns false (without an exception) and the uploads stop working.

I have absolutely no idea why this is happening.


public function upload(string $disk, string $path, string $target): bool
{
    return $this->filesystemFactory->disk($disk)->put($target, fopen($path, 'r+'));
}
0 likes
2 replies
lostdreamer_nl's avatar

If you do have your worker running my best guess is: your local file permissions are too strict.

You are running your queue worker under a different user than your webserver (www-data?).

I'm guessing this user has no read access to the file you are trying to upload.

TheDreamer's avatar

Good guess, but that's not the problem. The same queue does also rezise the image as expected. Oh and redis is running under the same user as the web server. It's really strange :( Maybe a Laravel or thephpleague/flysystem bug?

Please or to participate in this conversation.