Cecil
19+ years progress programming and still learning.
OE: 11.1
OS: CentOS Linux 6.3
Kernel & CPU: Linux 2.6.32-279.19.1.el6.i686 on i686 Intel(R) Xeon(R) CPU 5140 @ 2.33GHz, 1 cores
Apache version: 2.2.15
Hi Guys
I'm streaming a 15MB PDF file from WebSpeed to a browser and the upload speed seams a bit to slow. It takes about 40 Seconds to download a 15MB PDF file which I calculates about 387Kb per second. This speed test was on the local LAN and I get the same speed via the Internet.
The Web Server is on a separate server to the Application/Database Server, hence the reason why WebSpeed to delivering the file rather than my Apache WebServer.
The connection between the WebSpeed Messenger (CGI) and the WebSpeed Broker is transported via SSL connection, so this might have a bit of an impact on performance.
No matter what I try and change in my code, I can't break the the 387Kb limit.
What speeds can you get when stream a large file from WebSpeed?
Here is a snippet of code of what I'm currently doing:
OS: CentOS Linux 6.3
Kernel & CPU: Linux 2.6.32-279.19.1.el6.i686 on i686 Intel(R) Xeon(R) CPU 5140 @ 2.33GHz, 1 cores
Apache version: 2.2.15
Hi Guys
I'm streaming a 15MB PDF file from WebSpeed to a browser and the upload speed seams a bit to slow. It takes about 40 Seconds to download a 15MB PDF file which I calculates about 387Kb per second. This speed test was on the local LAN and I get the same speed via the Internet.
The Web Server is on a separate server to the Application/Database Server, hence the reason why WebSpeed to delivering the file rather than my Apache WebServer.
The connection between the WebSpeed Messenger (CGI) and the WebSpeed Broker is transported via SSL connection, so this might have a bit of an impact on performance.
No matter what I try and change in my code, I can't break the the 387Kb limit.
What speeds can you get when stream a large file from WebSpeed?
Here is a snippet of code of what I'm currently doing:
Code:
COPY-LOB FROM FILE chDirectory + '/' + ttDocument.UIDFilename TO OBJECT mpData NO-CONVERT.
ASSIGN
inSeekPosOffset = 1
inBytesRemaing = GET-SIZE(mpData)
inRangeLength = 1024 * 8
.
EXPORT-TO-STREAM:
DO WHILE inBytesRemaing GT 0 STOP-AFTER 20 ON STOP UNDO, RETRY EXPORT-TO-STREAM:
IF RETRY THEN DO:
MESSAGE 'STOP CONDITIONED RAISED.'.
RUN ClientEventFailed(INPUT GetClientGUID(),
INPUT 'Download',
INPUT SUBSTITUTE('Stop request issued. &1 &2',
chDirectory + '/' + ttDocument.UIDFILENAME,
get-field('filename')
)
).
LEAVE EXPORT-TO-STREAM.
END.
SET-SIZE(mpDataBuffer) = 0.
/** Get the remaing bytes...**/
IF inBytesRemaing LT inRangeLength THEN
ASSIGN
inRangeLength = inBytesRemaing.
COPY-LOB FROM OBJECT mpData STARTING AT inSeekPosOffset FOR inRangeLength TO OBJECT mpDataBuffer NO-CONVERT NO-ERROR.
IF ERROR-STATUS:ERROR THEN
LEAVE EXPORT-TO-STREAM.
{&OUT-LONG} mpDataBuffer.
PUT {&WEB-STREAM} CONTROL NULL(0).
ASSIGN
inBytesRemaing = inBytesRemaing - inRangeLength
inSeekPosOffset = inSeekPosOffset + inRangeLength.
/* MESSAGE STRING(((inSeekPosOffset / GET-SIZE(mpData)) * 100),'->>9.99%'). */
/* */
/* PAUSE 1 NO-MESSAGE. */
/* MESSAGE inBytesRemaing. */
/* MESSAGE inSeekPosOffset. */
/* MESSAGE STRING((inBytesRemaing / GET-SIZE(mpData) ) * 100, 'zz9.99%'). */
/* */
END.