Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook



The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic

Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.

If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.

Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.

Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

random page load and PDF errors

  • Filter
  • Time
  • Show
Clear All
new posts

  • random page load and PDF errors

    The 2 problems I have occur at random

    Error #1.) Our site will have issues either displaying or emailing PDF documents from a report. You can click the button/link a dozen times --- sometimes the PDF is emailed/displayed, sometimes it doesn’t. There are no errors with the code when I debug it. I have some loops which run daily which send a current statement to the clients --- some of the emails go out with the PDFs attached, some do not at random. Sometimes I can send reports for three days without any issue, the next day 20% could be missing the PDF attachment. It is always random when it occurs and it occurs across our site, regardless of what page, grid, UX, or while loop routine etc that you are attempting to run. It does seem to happen more with IE than Chrome or FireFox but most of our clients use IE so it is not an option to simply mandate Chrome be used.

    Error #2.) I do notice that on IE we also have many issues where a random page simply will error on loading. If you F5 to refresh, the page loads fine. This doesn’t seem to happen "as much" with Chrome or FireFox but again, most of our clients use IE and it does occur sometimes on Chrome and FireFox.

    - I have ruled out an Alpha software installation issue – we have recently been moved to a new server by Zebrahost with a fresh install. Both issues still persist.
    - We use A5V12 – 12.3 Build 2689 – 4440 --- unfortunately we are not a developer so we cannot afford/substantiate the cost to install the newest version of software. With each new version it seems we are required to rewrite a lot of our current code to make it compatible and this is not possible either for $ and time constraints since I personally wear all “hats” of the business – IT, CEO, sales, marketing, customer service etc.

    Some sample code showing how we setup the PDFs to either be displayed or emailed are shown below. I am not sure if the PDF display/creation is related to the random page load error or not… the only thing is that each of these happen at random anywhere on the site and will not occur the next time you try to load the page or view/email the PDF. Maybe there is a setting on the A5 Server is wrong? Here is how ours is setup:



    dim pSet as p
    	filename = Request.GetRequestTempFileName()
    	filename = report.saveas("CC_Receipt@[PathAlias.ADB_Path]\cc_receipts_report.set","pdf",filter,order,filename,.f.,pSet)
    	message.attachments = filename


    dim pSet as p
    	filename = Request.GetRequestTempFileName()
    	filename2 = Request.GetRequestTempFileName()
    	filename3 = Request.GetRequestTempFileName()
    	filename = report.saveas("PFC_SC@[PathAlias.ADB_Path]\finance_agreement.set","pdf",filter,order,filename,.f.,pSet)
    filename2 = report.saveas("PFC_Instructions_NON_WC@[PathAlias.ADB_Path]\Finance_Agreement.set","pdf",filter,order,filename2,.f.,pSet)
    	filename3 = report.saveas("PFC_PaymentForm@[PathAlias.ADB_Path]\Finance_Agreement.set","pdf",filter,order,filename3,.f.,pSet)
    	response.redirect(Session.FormatFileDataURL("Finance_Agreement.PDF?") + time("hms3"))

    Thank you for any guidance you can give --- this has been going on for years and I cannot continue like this offering a website to my clients which the pages and PDFs do not load 100% of the time.

  • #2
    Re: random page load and PDF errors

    Here is a follow up...

    I created a page that would run a daily report which is normally sent to the clients but instead routed all of the emails to my gmail account. This would allow me to run the script over and over and view the resulting emails to see if the PDF was included 100% of the time. As has been the case, most emails come through fine, but some are missing the PDF attachments.

    On the most recent attempt, I received 12 of 12 emails which were sent: 11 had the PDF attachment and 1 has no PDF.

    I checked the a5w_reportserver log file and all 12 PDFs show they started and finished. Specifically, tmp340D.pdf, is the file which didn't arrive in the email inbox.

    When I searched the temp file directory on the server, the missing PDF report file was there but was 0 bytes - essentially containing zero data and was an invalid PDF file.

    Any ideas?


    • #3
      Re: random page load and PDF errors


      Randomly across our website we experience problems where a page does not load (a5w, UX, dialog, grid etc) I believe this is related to the same issue we face where the PDFs were failing because the files were 0 bytes. While we can put a band-aid on the PDF issue by running a loop to check file size, the page load failures are a problem which cannot be resolved with simple coding.

      There is no specific page which experiences this – it happens everywhere on the site and it is random. It happens in all browsers, IE, Chrome and FireFox. If I hit F5 to refresh the page, the page loads fine. I might load the page 50 times and it would be fine… there is no rhyme or reason to why it fails.

      I used the DevTools in Chrome to track the issue and have the following example:

      When on an a5w page with a grid component on it, I selected an icon which loads another a5w page in a modal window – the page in the modal window failed to load.
      === see images 1 and 2 ===

      DevTools shows the following which indicates that the file was 0 bytes, causing the failure to load.

      I closed the modal window, selected the icon again to re-open the window and everything loaded properly – DevTools results shown below:
      === see image 3 ===

      We have tried several things in order to possibly rectify this issue to no effect:
      - We upgraded to a new server with ZebraHost – a fresh windows install and a fresh install of Alpha server
      - We renewed our Alpha Anywhere license which expired a few years ago and upgraded to the current build
      Moved from build 2689-4440 to current build 5028-5088
      In conclusion, from my limited knowledge, it appears to be an issue where the Alpha server is simply not processing the file (whatever that file may be – PDF, a5w, etc) and it is sending a 0byte file causing the browser to fail to load.

      I’m not sure what else to provide from the developer tools that may help you to isolate this issue. Here are some more details I pulled from that failed page load even, maybe something here can help.
      Attached Files
      Last edited by eswindhauser; 06-15-2018, 09:36 AM.


      • #4
        Re: random page load and PDF errors

        Is it only the last email that the PDF fails on?


        • #5
          Re: random page load and PDF errors

          no - it can fail anywhere. It is not the same report or webpage that fails. Every page and report on our site works. You can hit F5 to refresh a hundred times and you may see a 10% load error or a 50% load error. It is totally random so I cannot see that it is an issue with the coding. I thought we had mitigated issues with the server since we have a new server (still with ZebraHost) and have upgraded to the newest version of Alpha.

          at my wits end with this....


          • #6
            Re: random page load and PDF errors

            I noticed that a few upgrades ago a timing issue was introduced with printing PDFs. I have seen it fail three or four times and then suddenly work. I haven't had the chance to work on it, but I would look at the timing. Maybe put a sleep(1) statement somewhere or in javascript a timeout.


            • #7
              Re: random page load and PDF errors

              Yep, I have spent a lot of time trying to track down why the AA server seems to occasionally not respond. I don't know if it is because the user's request never makes it to the AA server or the AA server fails to respond or the response just never makes it back to the user.

              I'm in the process of having Zebrahost move us to a new facility and set us up without a load balancer on the traditional AA server. I've heard that load balancers can be a source of many problems.

              I built a client-side Ajax Event Tracking Log (AETL) that records all browser send and receive events that go through the "$a.simple" Ajax XMLHttpRequest object wrapper. There are a couple of other low level Ajax object wrappers that I do not bother logging. From the log I can see users are having troubles (failed response from server, server requests taking too long and events that never complete), but just not reporting them to me.

              I also discovered that the AA JS library is inconsistent with handling of detected errors. I have altered the JS library to display an error message when it fails to load a UX or Grid into the tabbedUI. Without the change the user just gets a spinning icon or blank tab when the main call for loading the grid or ux fails. There are secondary Ajax calls that take place when loading a Grid/UX. Displaying error messages for those events can be difficult.
              When we get moved to new facility (with no Load balancer, Solid State hard drives and 3x as much RAM) I will see if Ajax send/receive problems are diminished.

              After that, the next step is to see about converting to IIS AA. I hear that works better, or is at least better at covering up errors.


              • #8
                Re: random page load and PDF errors

                Thanks for all the detail. I've been using IIS for a while now and I'm still having the problems. It seems like after I got a bigger server box I had more timing issues. I started using the "Ajax failed Javascript" code hook and at least it gives the users some feedback so they can just click again to get it going again.


                • #9
                  Re: random page load and PDF errors

                  Ivasic - can you help direct me to the "Ajax failed JavaScript" you are referring to? I am not familiar with this.


                  • #10
                    Re: random page load and PDF errors

                    Lee, same type of problems under IIS ! ? -- I thought that fixed these things.

                    Eric, are you running under Alpha IIS ?

                    If so, I wonder if the AA worker process is crashing on these requests and IIS is restarting it and since session state is persisted in the SQL DB and not in memory (if using the session state storage method that Terry Smith demonstrated) that IIS and AA is able to continue on with repeated request from the user without having the user log back in?

                    Have you looked in the Windows logs and any logs AA IIS might be making to see if anything is showing up in the server logs?

                    BTW, the calls that run through the JS AA library function/object "$a.simple" are coded in the library to automatically send the request one more time to the server when they fail. It would be nice to find out if any of the calls that are failing in your app are going through that function or not.

                    I have only really looked at opening Grids and UX in a tabbedUI and processing of the save event. I have not looked at opening a5w pages or reports like you mentioned. Those probably go through a different mechanism. Nor, have I looked at what happens when the HTML refers to images, there's probably no way to track downloading of those like I do with the download of the Grid and UX component and submitting their data.
                    Last edited by RichCPT; 06-21-2018, 04:21 PM.


                    • #11
                      Re: random page load and PDF errors



                      • #12
                        Re: random page load and PDF errors

                        Ivasic - thank you. So do you simply write a javascript to display an error window instructing the user to refresh the page or can the javascript actually refresh it directly?


                        • #13
                          Re: random page load and PDF errors

                          Originally posted by RichCPT View Post
                          BTW, the calls that run through the JS AA library function/object "$a.simple" are coded in the library to automatically send the request one more time to the server when they fail.
                          I left out an important detail on the above quote: The request will be resent a second time only if the error status is 408 - "The server timed out waiting for the request."

                          So, if this 408 error is really something returned by the server, as the Mozilla and Microsoft documentation seems to be saying, then Alpha Server or IIS is the one that decided to return that error code. I would think it means the web server has decided the user has been idle too long (timed-out).

                          If the user's session has timed-out it seems to me that it does no good to try the request again, the server has already decided the user has been idle for too long.

                          It could be that 408 means something else, like the server got tired of waiting for the response to be built by the process procedure building the response on the server.

                          What ever error 408 really means, I suspect it is very rare and the automatic retry that it triggers is pretty much useless.

                          Maybe all XMLHttpRequest (ajax) calls that fail should be given a second chance to run. The ajax calls that fail to get a response within a specified time period could be a little tricky - as perhaps the user should be given a message and a choice between trying again or aborting. That is what Lee said he does at the application. But, I cannot image having to go through the entire application and setting up the "Ajax failed JavaScript" property. Especially, since one never knows what parts of AA have that option.

                          I think something has to be done at the very low level in the JavaScript library to help alleviate these problems. Even if the problem occurs only a small percentage of the time, that is reason enough for customers of a commercially marketed application to find another product.

                          I have two windows desktop applications that access ISAM database servers across the Internet using TCP/IP. These apps do the same things that I'm trying to do with this AlphaAnywhere web application. But the users practically never have to re-submit requests to open forms or save records. These apps just work flawlessly across TCP/IP and they are very fast, despite not have a SQL database on the server! A small data server engine runs on the server as it services request to read/write data to ISAM files on the server.


                          • #14
                            Re: random page load and PDF errors

                            RichCPT - I agree about having to rewrite code on every page to alleviate this issue... we have over 1000 A5W and UX/Grid/Dialogs.... it would take us hundreds of hours to place code on every one of those pages... that is if I can even grasp the concept of what I need to do on each page to catch this error and refresh or ask the user to refresh (which is really crappy for an enterprise program). Maybe I need to send this up to Selwyn as a bug report? This cannot be acceptable to roll out to a commercial website/database.


                            • #15
                              Re: random page load and PDF errors

                              I found an option under IIS WAS, Session State, that says "Regenerate expired session ID". Maybe under IIS a session can be automatically renewed and that could be the reason for status error 408 leading to a second try of submitting the request to the server in the XMLHttpRequest function/object's "onStateChange" event. But I don't get how that would work.