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

Announcement

Collapse

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

The client is no longer connected

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    The client is no longer connected

    Has anyone experienced this error that we have been seeing? Beginning around last December, we began receiving errors in our A5XbasicErrorStackLog.txt “The client is no longer connected.” We are using IIS server for Alpha and MariaDB for our database. We currently use Alpha 5647, but it appears the problem began with 5487. We use PhoneGap 8.0, and the tablets that run our app are on Android 7.1.

    Code:
    ==========================================================
    INFO: Tue Apr 30 09:49:10 2019
    Client is no longer connected (Cancelation token).
     Processing started at 2019-04-30T14:48:20.5088847Z UTC
    Disconnect detected at 2019-04-30T14:49:10.4777268Z UTC
                  Duration 00:00:49.9688421
    Request Method: POST
    Request: /mSales5_1_5647_Prod/MSALES5_MAIN_UX.a5wcmp?__virtualPage=__a5RunDialog.a5w&__dialogFilename=MSALES5_MAIN_UX&__alias=DLG1&__unsaved=no
    ==========================================================
    Tue Apr 30 09:49:11 2019
     A5W: The client is no longer connected.
    Execution Stack:
    0#183 x_out = a5_ajax_dialog2(tmpl)
    ==========================================================
    Tue Apr 30 09:49:11 2019
     Script:a5_sql_nested_query_to_json_document() line:1386
    A5W: The client is no longer connected.
    Execution Stack:
    0#183 x_out = a5_ajax_dialog2(tmpl)
    ==========================================================
    Tue Apr 30 09:49:11 2019
     Script:a5_sql_nested_query_to_json_document() line:1386
    A5W: The client is no longer connected.
    Execution Stack:
    0#183 x_out = a5_ajax_dialog2(tmpl)
    ==========================================================
    Tue Apr 30 09:49:11 2019
     Script:a5_sql_nested_query_to_json_document() line:1386
    A5W: The client is no longer connected.
    Execution Stack:
    0#183 x_out = a5_ajax_dialog2(tmpl)
    ==========================================================
    Tue Apr 30 09:49:11 2019
     Script:a5_sql_nested_query_to_json_document() line:1386
    A5W: The client is no longer connected.
    Execution Stack:
    0#183 x_out = a5_ajax_dialog2(tmpl)
    ==========================================================
    Tue Apr 30 09:49:11 2019
     Script:a5_sql_nested_query_to_json_document() line:1386
    A5W: The client is no longer connected.
    Execution Stack:
    0#183 x_out = a5_ajax_dialog2(tmpl)
    ==========================================================
    Tue Apr 30 09:49:11 2019
     Script:a5_sql_nested_query_to_json_document() line:1386
    A5W: The client is no longer connected.
    Execution Stack:
    0#183 x_out = a5_ajax_dialog2(tmpl)
    ==========================================================
    Tue Apr 30 09:49:11 2019
     Script:a5_sql_nested_query_to_json_document() line:1386
    A5W: The client is no longer connected.
    Execution Stack:
    0#183 x_out = a5_ajax_dialog2(tmpl)
    ==========================================================
    Tue Apr 30 09:49:11 2019
     Script:a5_sql_nested_query_to_json_document() line:1386
    A5W: The client is no longer connected.
    Execution Stack:
    0#183 x_out = a5_ajax_dialog2(tmpl)
    ==========================================================
    Tue Apr 30 09:49:11 2019
    
    Thread: t0
    Request URI: /mSales5_1_5647_Prod/MSALES5_MAIN_UX.a5wcmp?__virtualPage=__a5RunDialog.a5w&__dialogFilename=MSALES5_MAIN_UX&__alias=DLG1&__unsaved=no (from 166.137.126.107)
    Script: /mSales5_1_5647_Prod/__a5RunDialog.a5w
    Line: 183
    x_out = a5_ajax_dialog2(tmpl)
    Script:a5_sql_nested_query_to_json_document() line:1386
    A5W: The client is no longer connected.
    Execution Stack:
    0#183 x_out = a5_ajax_dialog2(tmpl)
    ==========================================================
    I reached out to Sewlyn and he did confirm that a change was made to the IIS server in build 5321 in which if the server detects that the client (i.e. the browser) has "gone away" (i.e. stopped listening for a response), then a message is sent to the Xbasic processor to stop processing.

    We also got help from Terry Smith, who stated that “A lost connection can be deliberate with a user cancelling a request by clicking the browser's cancel button. Or a lost connection can be due network connectivity being lost and not recoverable. Unfortunately, Application Server for IIS does not know the difference. It only knows that IIS has marked the client as no longer connected.”

    However, I am pretty sure this is not the cause of our error. When I install the app for our user, everything syncs fine for a week or so. Then he begins getting alerts that the AJAX callback is failing (using the saveListEdits command). After he begins having problems, then every sync will result in the AJAX callback fail and an error “The client is no longer connected” in the log. It doesn’t really seem related to network issues or the user somehow canceling the sync. I then must clear all the data for the app and have the user log in again, in which case he is able to sync fine again for another week or so and then will begin with the same problem again.

    Other info that might be helpful is that the list that is having trouble syncing has children and grandchildren. It also should be noted that they all have auto increment integers as the primary key. When the order is created the auto increment value is usually blank until we sync, in which the database will give it the correct Primary Key value. When we begin having trouble syncing, it appears that the AJAX callback fails and the list stays dirty and the primary key is not retrieved. However, what is really strange is that the data is written to our database. If the user tries to sync again, the same data is sent (which makes sense because it is still dirty), which usually results in duplicate information being synced. Eventually though, not all of the user’s orders will sync (perhaps the data to send becomes too large).

    Back when we first began having trouble last December, I the thing I did to get it to work was to publish in an older version of Alpha (5221), then opened the 5221 client, recalculated my controls, and did an Instant Update in Phone Gap, changing my AJAX URL to the one just published with version 5221. After doing this, all orders synced fine just as they always have. However, going back to 5221 at this point may not be possible as Alpha has introduced new features in the newer releases that our app currently uses. But this leads me to believe that something was introduced in 5321 that is causing our problem.

    I would like to formulate a test case to send to Alpha to demonstrate the problem, although it is difficult for me to reproduce exactly what cause the problem to begin happening in the first place. I was wondering if anyone else has a similar problem, or at least could point me in the right direction as to things I could try to try to solve the problem. Thank you.

    #2
    Re: The client is no longer connected

    I believe that the newer browsers will attempt do some predicting and pre-loading of resources based on the users' behavior.

    The browser will open a couple of TCP connections for these types of "performance" optimizations but not always actually follow up with any type of HTTP request.
    The web server will/may however decide to close the opened connection after a moment and send out a HTTP status code that probably should just be ignored by the browser.

    The subject has already come up and it seems that maybe some core Alpha Anywhere code decides to just try again to send "the" request. But what request does the app think it should try to send again if the trigger for the closed connection response was some Chrome predictive service who originally opened the connection?

    Comment


      #3
      Re: The client is no longer connected

      Looking at my log above and my current logs, it appears the duration is always around 50 seconds, which I believe is the default client timeout for Android. We have contacted Alpha about ways around this timeout, and they say there is not a way around it. Selwyn did mention trying the new chunked responses, but this seems to be more for your own XBasic functions as opposed to simply using Alpha's saveListEdits command.

      I've considered changing the batch size to possibly send the sync in batches. However, I also do not know if this will be helpful to us. We have one list with three children, and one of those children has a child and grandchild. Perhaps having so many children is not the best design practice. I've had a user today run into the "client is no longer connected" error, but it was only one record in the parent list, with many records in the children. It seems like setting the batch size even to 1 would not help in this case, as the batch size I assume refers to records in the parent.

      Comment


        #4
        Hello. I'm having the same issue with the IIS "client is no longer connected" and wondering if anyone ever came up with a solution or elegant workaround. Thanks for any advice.

        Comment


          #5
          Hello Chris. In our case, we are using Android which automatically times out after 50 seconds regardless of the timeout you set in Alpha. What was probably taking so long for our data to sync is that we have a list with many children as much as four generations deep.

          After writing this post in 2019, Alpha expanded chunked responses so that they can be used with the saveListEdits command. What this will do for you is when syncing your data, before any CRUD event on the server, it will send a response back to the client to let it know that it is still connected and the connection will not terminate. It has really helped us and I almost never see "The client is no longer connected" error anymore. Hope this helps

          Comment


            #6
            Thanks so much. This is a really helpful lead for me to pursue.

            Also, the documentation says: "Important: In order to use chunked responses on IIS or Alpha Cloud, you must enable JIT Sessions. On Alpha Cloud, the JIT Sessions option is available in the Deployment dialog." I'm not sure where to enable JIT Sessions on IIS though. Any idea?

            Comment


              #7
              I don't remember having to do that. Possibly it is enabled by default or possibly I just don't remember.

              Comment

              Working...
              X