Welcome, Guest
You have to register before you can post on our site.

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 97,351
» Latest member: hitomirawdb
» Forum threads: 2,426
» Forum posts: 11,371

Full Statistics

Online Users
There are currently 1211 online users.
» 3 Member(s) | 1203 Guest(s)
Applebot, Baidu, Bing, Google, Yandex, hitomirawdb, manclubm7uscom, Mm99zipinnet

Latest Threads
WebApplication.IP change ...
Forum: IntraWeb General Discussion
Last Post: MJS@mjs.us
7 hours ago
» Replies: 1
» Views: 102
Hook/callback to handle t...
Forum: IntraWeb General Discussion
Last Post: Lenfors
09-08-2026, 09:03 AM
» Replies: 0
» Views: 102
Reproducible IIS crash in...
Forum: IntraWeb General Discussion
Last Post: alex.trejo@tttnet.com.mx
09-08-2026, 01:48 AM
» Replies: 0
» Views: 113
The packages IW16.xx inc...
Forum: IntraWeb General Discussion
Last Post: hsbelli
09-03-2026, 11:46 AM
» Replies: 2
» Views: 393
Redirection issues with F...
Forum: IntraWeb General Discussion
Last Post: magosk
08-31-2026, 10:03 AM
» Replies: 0
» Views: 200
Source Code
Forum: IntraWeb General Discussion
Last Post: magosk
08-31-2026, 08:11 AM
» Replies: 3
» Views: 563
TContenthandler requires ...
Forum: IntraWeb General Discussion
Last Post: valmeras
08-30-2026, 02:35 AM
» Replies: 0
» Views: 191
TIWjQDBGrid erratic behav...
Forum: IntraWeb General Discussion
Last Post: alex.trejo@tttnet.com.mx
08-20-2026, 05:12 PM
» Replies: 8
» Views: 2,133
Change Language DataTable
Forum: IntraWeb General Discussion
Last Post: Rigoberto Mercedes
08-19-2026, 03:21 PM
» Replies: 1
» Views: 325
How to terminate HTTP Thr...
Forum: Indy
Last Post: rlebeau
08-14-2026, 08:01 AM
» Replies: 5
» Views: 925

 
  TIdFTPServer slow-ish
Posted by: OzAWebb - 01-29-2024, 12:45 PM - Forum: Indy - Replies (2)

G'day from Downunder,

Indy10, as supplied with Delphi 2006 (sorry, can't recall whether I've updated it).

Using IdFTPServer to receive files from a third-party hardware device.
Device sends files in batches of 200 or more of small 30k-ish files.
Device establishes a new FTP connection - login etc - for every file and disconnects after each, then immediately logs in for the next file.
Device uses passive PASV data transfer.

Sample data capture from Wireshark:

No. Time    Source          Destination    Prt Len Info
18  49:56.2 192.168.11.102  192.168.11.100  FTP 60  Request: PASV
19  49:56.2 192.168.11.100  192.168.11.102  FTP 104 Response: 227 Entering Passive Mode (192,168,11,100,0,20).
20  49:56.2 192.168.11.102  192.168.11.100  TCP 60  49250  >  20 [SYN] Seq=0 Win=4096 Len=0 MSS=1024
21  49:56.2 192.168.11.100  192.168.11.102  TCP 58  20  >  49250 [SYN, ACK] Seq=0 Ack=1 Win=64512 Len=0 MSS=1460
22  49:56.2 192.168.11.102  192.168.11.100  TCP 60  49250  >  20 [ACK] Seq=1 Ack=1 Win=4096 Len=0
23  49:56.2 192.168.11.102  192.168.11.100  FTP 103 Request: STOR 20240919_111530.jpg.tmp
24  49:56.2 192.168.11.100  192.168.11.102  FTP 108 Response: 150 File status okay; about to open data connection.
25  49:56.2 192.168.11.102  192.168.11.100  FTP-DATA    1078    FTP Data: 1024 bytes (PASV) (STOR 20240919_111530.jpg.tmp)
    :          :
68  49:56.3 192.168.11.102  192.168.11.100  FTP-DATA    1078    FTP Data: 1024 bytes (PASV) (STOR 20240919_111530.jpg.tmp)
69  49:56.3 192.168.11.100  192.168.11.102  TCP 54  20  >  49250 [ACK] Seq=1 Ack=30721 Win=64512 Len=0
70  49:56.3 192.168.11.102  192.168.11.100  FTP-DATA    715 FTP Data: 661 bytes (PASV) (STOR 20240919_111530.jpg.tmp)
71  49:56.3 192.168.11.102  192.168.11.100  TCP 60  49250  >  20 [FIN, ACK] Seq=31382 Ack=1 Win=4096 Len=0
72  49:56.3 192.168.11.100  192.168.11.102  TCP 54  20  >  49250 [ACK] Seq=1 Ack=31383 Win=63851 Len=0
73  49:56.3 192.168.11.100  192.168.11.102  TCP 54  20  >  49250 [FIN, ACK] Seq=1 Ack=31383 Win=63851 Len=0
74  49:56.3 192.168.11.102  192.168.11.100  TCP 60  49250  >  20 [ACK] Seq=31383 Ack=2 Win=4095 Len=0
75  49:56.6 192.168.11.100  192.168.11.102  TCP 138 [TCP Retransmission] 21  >  49249 [PSH, ACK] Seq=245 Ack=159 Win=64354 Len=84
76  49:56.6 192.168.11.102  192.168.11.100  TCP 60  [TCP ACKed unseen segment] 49249  >  21 [ACK] Seq=159 Ack=329 Win=3768 Len=0
77  49:56.6 192.168.11.102  192.168.11.100  FTP 103 Request: RNFR 20240919_111530.jpg.tmp
78  49:56.6 192.168.11.100  192.168.11.102  FTP 110 Response: 350 Requested file action pending further information.
79  49:56.6 192.168.11.102  192.168.11.100  FTP 99  [TCP ACKed unseen segment] Request: RNTO 20240919_111530.jpg
80  49:56.6 192.168.11.100  192.168.11.102  FTP 62  Response: 250 Ok
81  49:56.6 192.168.11.102  192.168.11.100  FTP 60  [TCP ACKed unseen segment] Request: QUIT
82  49:56.6 192.168.11.100  192.168.11.102  FTP 68  Response: 221 Goodbye.


(Bulk of data transfer removed for brevity between lines 25 & 68)

The problem is the delay between lines 74 & 75 - might only be 300ms, but that adds up over 200+ files.
(Using Filezilla for the FTP server is about 3 times faster than using Indy.)

I initially noticed that after the final data packet (line 70 above) Indy wasn't responding with the expected 226 'Closing data connection.' , so I thought (I'm a FTP novice) that perhaps the device wasn't closing the data connection. So I hacked the ReadFromStream procedure in TIdFTPServer.DoDataChannelOperation() to exit if the packet size was under 1k. That resulted in Indy providing the 226 response:

74  07:48:43.986  192.168.11.102   192.168.11.100   FTP-DATA 940 FTP Data: 886 bytes (PASV) (STOR 20240129_074854.jpg.tmp)
75  07:48:43.986  192.168.11.102   192.168.11.100   TCP 60 49158 > 50499 [FIN, ACK] Seq=32631 Ack=1 Win=4096 Len=0
76  07:48:43.986  192.168.11.100   192.168.11.102   TCP 54 50499 > 49158 [ACK] Seq=1 Ack=32632 Win=64512 Len=0
77  07:48:43.990  192.168.11.100   192.168.11.102   TCP 54 50499 > 49158 [FIN, ACK] Seq=1 Ack=32632 Win=64512 Len=0
78  07:48:43.991  192.168.11.102   192.168.11.100   TCP 60 49158 > 50499 [ACK] Seq=32632 Ack=2 Win=4095 Len=0
79  07:48:44.160  192.168.11.100   192.168.11.102   TCP 108 [TCP Retransmission] 21 ? 49157 [PSH, ACK] Seq=247 Ack=159 Win=64354 Len=54
80  07:48:44.161  192.168.11.102   192.168.11.100   TCP 60 49157 > 21 [ACK] Seq=159 Ack=301 Win=3796 Len=0
81  07:48:44.445  192.168.11.100   192.168.11.102   FTP 84 Response: 226 Closing data connection.
82  07:48:44.445  192.168.11.102   192.168.11.100   FTP 103 Request: RNFR 20240129_074854.jpg.tmp



(Captures were taken on different dates so don't correspond exactly.)

But there's still a delay before the 226 response (line 81).

After a quick Google of 'FIN ACK' it seems that the device is to blame, as it shouldn't ?? be including the ACK as it has nothing to acknowledge.
So I'm thinking the unexpected ACK is throwing Indy off.

(For reference Filezilla's handling looks like so:
68  12:35:34.094 192.168.11.102  192.168.11.100  FTP-DATA    938 FTP Data: 884 bytes (PASV) (STOR 20240919_110108.jpg.tmp)
69  12:35:34.094 192.168.11.102  192.168.11.100  TCP 60  49206 > 50507 [FIN, ACK] Seq=30581 Ack=1 Win=4096 Len=0
70  12:35:34.094 192.168.11.100  192.168.11.102  TCP 54  50507 > 49206 [ACK] Seq=1 Ack=30582 Win=64512 Len=0
71  12:35:34.094 192.168.11.100  192.168.11.102  TCP 54  50507 > 49206 [FIN, ACK] Seq=1 Ack=30582 Win=64512 Len=0
72  12:35:34.094 192.168.11.100  192.168.11.102  FTP 80  Response: 226 Operation successful
73  12:35:34.095 192.168.11.102  192.168.11.100  TCP 60  49206 > 50507 [ACK] Seq=30582 Ack=2 Win=4095 Len=0
74  12:35:34.095 192.168.11.102  192.168.11.100  TCP 60  49205 > 21 [ACK] Seq=159 Ack=364 Win=3733 Len=0
75  12:35:34.095 192.168.11.102  192.168.11.100  FTP 103 Request: RNFR 20240919_110108.jpg.tmp

No delay, no TCP retransmission.)

Went hunting for Indy's FIN (and ACK) handling and came up empty (except for IdRawHeaders.pas and IdRawFunctions.pas which appear to not be referenced). Bit more Googling seems to show they are handled at a lower level than Indy. (But if that's the case how come Filezilla works???)

I welcome any and all suggestions as to how to resolve this, including any solutions that should have been blazingly obvious!
(But excluding 'Just use Filezilla' as we're currently doing precisely that, but it'd be nicer to use Indy integrated with our code.)

Thanks in advance for any replies,

Adam.

Print this item

  IntraWeb 15.5.6 is out!
Posted by: Alexandre Machado - 01-28-2024, 05:55 AM - Forum: IntraWeb General Discussion - Replies (1)

Hi guys,

there is a new IntraWeb update available containing a couple of urgent bug fixes: 

https://www.atozed.com/2024/01/intraweb-15-5-6/

Enjoy!  Big Grin

Print this item

  IntraWeb versus ASP.NET: A performance comparison
Posted by: Alexandre Machado - 01-28-2024, 12:21 AM - Forum: IntraWeb General Discussion - Replies (5)

I believe you guys will like this new comparison that I've just published (except if you are not using IntraWeb, of course)  Big Grin

https://www.atozed.com/2024/01/intraweb-versus-aspnet/

Bottom line is:

IntraWeb throughput is 5x higher
IntraWeb memory consumption is 22x lower

The numbers speak for themselves. The code and the test plan are both published and the link can be found in the article.

Enjoy!

Print this item

  recent breaking change
Posted by: iwuser - 01-24-2024, 08:02 PM - Forum: IntraWeb General Discussion - Replies (3)

Just noticed that with the latest IW versions, in the spot in my code where I need to bump up session timeout mid-flight, it no longer works:

"SessionOptions.SessionTimeout is locked. Suggestion: Set in ServerController OnConfig event instead."

This suggestion does not work for me, because I typically set the timeout small up-front, in ServerController OnConfig event, but then later in this case I need to prompt the user and so I need to increase it. Or I could do it the other way around: make it long up-front and then shorten it later in all other cases.

Can it be restored back to how it was before, please?

Print this item

  IntraWeb Performance x Memory Managers
Posted by: Alexandre Machado - 01-24-2024, 04:54 AM - Forum: IntraWeb General Discussion - Replies (4)

Hi guys,

here is a new article that I've just published in our blog:

https://www.atozed.com/2024/01/capacity-...-managers/

There is some great information there and I hope you guys enjoy it  Big Grin

Cheers

Print this item

  How to create control at runtime if using template?
Posted by: RenSword - 01-23-2024, 09:34 AM - Forum: IntraWeb General Discussion - Replies (8)

Code:
procedure TIWForm1.btnTestAsyncClick(Sender: TObject; EventParams: TStringList);
begin
  var B := TIWButton.Create(Self);
  B.Parent := Self;
end;
this can be used to create control at runtime, however, when refresh page, the html element of button is lost and not redrawn.
This issue only occur when using template processor. if possible I did like to create the control at runtime, and not add extra thing to the template.html.

Print this item

  Main form in Secure mode
Posted by: Comograma - 01-22-2024, 06:01 PM - Forum: IntraWeb General Discussion - Replies (10)

How do I start my application (Main form) in secure mode (SSL + TLS) ?

Print this item

Question Share datamodules between Intraweb and VCL projects
Posted by: David1 - 01-22-2024, 10:23 AM - Forum: IntraWeb General Discussion - Replies (1)

Hello,

this is a more general architectural question than a specific Intraweb one...:

I have a fully functional Intraweb application which manage some classes and data modules.
I would like to leverage on these classes and data modules in a new VCL application.

For the classes is enough to share files but for the datamodules (which leverage on FireDAC) I would like to know which is the best way to manage the connection to DB.

In my Intraweb application all the datamodules refer to a connection component in the Usersession object.
When I try to use them in the VCL application I relized I cannot use the Usersession unit (or at least I think is not the best solution) and I don't know how to manage the connection to the DB in the datamodules.

I thinking about define a parameter to pass the connection in the datamodules constructor but perhaps there is a better solution.

Which is the best way to share datamodules and address the FDConnection between IW and VCL projects?

Thank you,
Davide

Print this item

  Intraweb returning code 6 on Twilio xml requests (Priority support)
Posted by: valmeras - 01-22-2024, 03:19 AM - Forum: IntraWeb General Discussion - Replies (3)

I am using C++ Builder 10.2.3 with Intraweb 15.5.5
I am trying to make a Twilio automatic phone call using TwilioClient
Below is a summary of the code:

  TTwilioClient *Client;
  std::auto_ptr<TStringList> allParams(new TStringList);
  TTwilioClientResponse response;
  UnicodeString fromPhoneNumber, toPhoneNumber;


   allParams->Add("From=" + fromPhoneNumber);
   allParams->Add("To=" + toPhoneNumber);
   allParams->Add("Url=https://www.mywebsite/twilio.xml");


   response = Client->Post("Calls", allParams.get());

   twilio.xml is saved in wwwroot directory and it contains the text which is supposed to be spoken during the automatic call. Unfortunately this is how Twilio works for automatic outbound calls.

The call is performed on the destination number. But an error message is spoken by instead of the text in the xml file.
When I contacted Twilio support, this is what they responded (see attached PDF file).

The application is returning code 6 instead of text/xml or application/xml. I have an Apache server where the xml file is stored. But the Intraweb application I am running is not behind an Apache server!
And code 6 does not correspond to any Apache server response.
So, I think it is Intraweb application which is sending the wrong response.

When I check in IWMimeTypes.hpp, I see this:
enum DECLSPEC_DENUM TMimeType : unsigned char { mtUnknown, mtBinary, mtJPG, mtGIF, mtPNG, mtRSS, mtXML, mtTXT, mtICO, mtHTML, mtJavaScript, mtPDF, mtZIP, mtCSS, mtMP3, mtOGG, mtWAV, mtEXE, mtFlash, mtWMV, mtMOV, mtAVI, mtMPEG, mtXSL, mtGZIP, mtWOFF, mtTTF, mtOTF, mtSVG, mtJSON, mtDOCX, mtXLSX, mtPPTX, mtMP4 };

Code 6 corresponds to mtXML in the enum declaration.
So, is it Intraweb which is sending the wrong response as it seems?



Attached Files
.pdf   TwilioResponse.pdf (Size: 282.76 KB / Downloads: 6)
Print this item

  CG Dev Tools
Posted by: zsleo - 01-22-2024, 01:14 AM - Forum: IntraWeb General Discussion - Replies (2)

I want desperately to move to Delphi 12.

The only thing holding me back is CG Dev Tools ....

I cannot get any response from them .... and I have tried!

I think it is time to move from CGD but to what?

I have a few large code base apps that will take a LOT of effort and cost a lot to move.


By the look of it, IW bootstrap is the most promising option but, again, it will take a lot of effort.

Any and all pointers, advice, etc. will be welcomed.

TIA

P.S. I am still getting notification emails from CGD requesting I pay my annual subscription that is due this month .... Big Grin

Print this item