Error received return status 0.More number of users are going to access the same file

173 views
Skip to first unread message

Jayaseelan A

unread,
Nov 12, 2015, 1:04:28 PM11/12/15
to PDFTron WebViewer
Hi,

Using version 1.7.0 of the WebViewer and trying to connect to a Amazon streaming cloudfront url, now my problem is multiple user(above 300) can view the same file at the same time. The error returned is the following:

Error retrieving file: <filename>. Received return status 0.

Note: Below 100 users access the same file at the same time.  its working as expected, but more number of users are going to access the same file at same time return error.

The following sample code,

 myWebViewer = new PDFTron.WebViewer({
          type: type,
           path: 'lib',                           //URL path to the WebViewer root folder
initialDoc: "https://d2qteosojckly0.cloudfront.net/85a35ee4_24_12_2014_17_44_39.xod?Expires=1445237834&Signature=H~JS2sHNjJaI9uu7sGe0V0z-           dsfgdhghgasfdfsggfjhfgfghghkyhjdfgfbmh-RS09paI6ok4R5y5MIG0NWxkDKlqr-pcbKokJ4ke0AuNWRi~8GUjCWzgHmd2kkFNz66zHtJdwH0jViPUbF3KaHGPyo4VP55ttXDKGcwqHgzquEwzAnczghyV8etgmAMNjbEiwd69SabHPSnkcTRTE7PmDqY-adasdasdasdewergdfghfgydrfgdfg-YBQKtPYebcmPmnz4XfDCiTOPsFl0laLJNKmQy~qnRjQSIbA__&Key-Pair-Id=123423432432sfdsf",  //URL path to the document
           documentType: docType,               
           enableAnnotations: true,
           mobileRedirect: false,
             streaming: false                   //set streaming to 'true' if your .xod server doesn't acknowledge byte-ranges
            }, viewerElement);
In Readercontrol.js

                       if (streaming === true) {
                            partRetriever = new CoreControls.PartRetrievers.StreamingPartRetriever(doc, cacheHinting.NO_HINT, decrypt, decryptOptions);
                        } else {
                            partRetriever = new CoreControls.PartRetrievers.HttpPartRetriever(doc, cacheHinting.NO_HINT, decrypt, decryptOptions);
                        }
This is become very critical for us.Does anyone have any idea how to fix this issue?.

waiting for your reply.

Thanks

Anatoly Kudrevatukh

unread,
Nov 12, 2015, 3:03:01 PM11/12/15
to pdfnet-w...@googlegroups.com
Hello,

Since our code is on the client side, from WV point of view it is irrelevant how many users are trying to access the file. We are making a simple ajax request to retrieve the file and the server response is beyond our control. I'm afraid you will have to figure this one out with your hosting provider. Maybe you are reaching your service limits? http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_cloudfront
Reply all
Reply to author
Forward
0 new messages