Uploading files FTPS more than 16384 bytes

Wappler Version : 6.7.2
Operating System : Windows
Server Model: ubuntu 22
Database Type: postgresql
Hosting Type: custom

I use FTPS(explicit) to transfer files to the server. I connect by a third-party client and easily upload files of any size in any quantity. Using the same server data in Wappler, the connection test passes positively. When I publish files to the server, files smaller than 16384 bytes are uploaded without any problems. If the file is larger than 16384 bytes, then only 16384 bytes are uploaded and Wappler reports an error, after 2 errors the transmission stops. What do you recommend?

That is an abnormally high file size. What is the for? That size file would take forever to load in a browser if it ever does.

16384 bytes, not megabytes, not gigabytes, not terrabytes :slight_smile: :slight_smile: only 16Kb

Oh, lol. That should be no problem. What kind of file is it? Maybe it's more of a file type issue than a size issue?

What if you increased the timeout value in the Wappler settings? Just guessing here.

I think it doesn't matter what type of file. Wappler starts uploading and it succeeds in uploading jpg, json, js files. But as soon as the upload process reaches the "big" file, an error occurs, once again and the transfer stops....

The ftp server log says: FAIL UPLOAD: Client....
The line appears in the Wappler log: 426 failure reading network stream.

What is the actual size of the file? I have a 522k file t hat uploads no problem, so I don't think it's a Wappler restriction?

Everything happens very quickly, the file starts to be transferred and an error is issued almost immediately. I have a fairly fast Internet connection. It's clearly a matter of size, but the ftp server does not set any limits. I think it's not about the timeout, but I'll set 30 seconds and try again.

Actual file size only 33Kb

If you're talking about one file only and only this file, maybe the file is corrupted or something is wrong with the specific file...

1 Like

The file is not corrupted. It opens and I was able to rewrite it with the help of another client. In addition, while browsing through what has already been uploaded, I came across several files larger than 16 KB. It's probably not about the size. I used to use only FTP, but now I'm trying to set up work via FTPS on a new server.

I have set a higher limit on attempts to transfer the file. Now it transfers some files 3 times and eventually they are uploaded. This was not the case with regular FTP before. Now I have changed the protocol in Wappler and the server is now FTPS. Which of them is the problem is not yet clear. But transferring files through other clients does not have such problems. In the case of Wappler, problems start in the first minute of transmission.

Does anyone work via FTPS (explicit)?

I found similar problems, but their solution has not helped me yet. However, it is precisely about the incorrect behavior of the client.

If someone has worked with an FTPS server, tell me which one. I will install one that is compatible with Wappler.

That might be it indeed, and as the article says you just have to disable it in vsftpd.conf

According to the man page for vsftpd.conf, this should be disabled per default:
strict_ssl_read_eof If enabled, SSL data uploads are required to terminate via SSL, not an EOF on the socket. This option is required to be sure that an attacker did not terminate an upload prematurely with a faked TCP FIN. Unfortunately, it is not enabled by default because so few clients get it right. (New in v2.0.7). Default: NO
However, in the code it's enabled by default:

Yes i did. No result :frowning:

I see this problem is very common. One of the great tips was to switch to SFTP. Which I'll try to do....

It's amazing that after decades of FTP development, it has such problems. Maybe I'll get lucky with SFTP. :wink:

Switched to SFTP. Such a problem has been noticed. If you use a lot of threads, then everything leads to an error. Obviously, because one thread creates a directory, and the other writes a file there. Since the file is written first, the error there is no directory occurs. But in single-threaded mode, everything is fine.

And it would be nice to sort out the "Targets" settings so that when you make changes to the database settings, a new connection named "db" does not appear.