Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6725981
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T09:52:20+00:00 2026-05-26T09:52:20+00:00

Problem I have a long running import job which I start with an ajax

  • 0

Problem

I have a long running import job which I start with an ajax request, it could take some minutes until the request is finished. While this first ajax request is running, I want to have a look at the server to know how far the import is gone, this second request will be done every 2 seconds or so.

When I use the Ext.Ajax method the requests seems to be chained – the first ajax request (import) runs until it is finished, just then the second (import update) is fired.

I saw that Ext.Ajax is singleton, so maybe thats the reason. So I tried to create my own Connection objects with Ext.create('Ext.data.Connection') but it doesn’t work.

My current request chain is:

  • first request – start
  • first request – end
  • second request – start
  • second request – end

But it should be:

  • first request – start
  • second request – start
  • second request – end
  • …maybe more second requests
  • first request – end

Question

The browser should be able to handle multiple request, there must be a limitation inside ExtJS but I didn’t find it?


Update 2011-10-16

Answer

The problem wasn’t ExtJS – sorry! It was PHP, my first script works with the session and the second script tried to access the session as well. And because PHP sessions are file based, the session file was locked from the first request script and the second request script had to wait until the first release the session lock.

I solved this with this little piece of code I added to my import process (the first script) after every x row:

 $id = session_id();
 session_write_close();
 sleep(1);
 session_start($id);

So it stops and reloads the session and the other script was able to hook in and get the session information.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T09:52:20+00:00Added an answer on May 26, 2026 at 9:52 am

    Singleton or non-singleton doesn’t even change the way Ext.Ajax works. I think this could be due to the coding (did you wait for the calls to finish?)

    Afaik, I never have this problem before when I do multiple calls. The only thing that is hogging the calls is the server (PHP), which doesn’t support parallel processing and causes delays, and generate a pattern like this

    • Call 1 – start
    • Call 2 – start
    • Call 1 get processed in the server and Call 2 get queued up
    • Call 1 – finished
    • Call 2 get processed in server
    • Call 2 – finished

    It could be disastrous if Call 1 requires more time to process than Call 2.

    EDIT:

    I have written this little demo just for you to feel how does it works. Check it out 🙂 Spent me half an hour lol!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have long running workflow which is persisted into database using SqlWorkflowInstanceStore, the problem
When you have a long running job in Jenkins which is composed of many
I have an Android app, in which Activities fire long running operations that run
I face a problem on my application , I have a long running process
I currently have a long running thread which uses a hibernate session to perform
I have a possibly long running program that currently has 4 processes, but could
I have a long standing problem: at work we're using mercurial as a DSCM,
My problem is simple: I have a long list of elements that I want
I have a long string, ex: Please help me to solve this problem. This
My problem is the following: I have a 2-minute long WAV file, and my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.