Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Getting timeout after 2 minutes and Save Process not working

rajuFeb 17 2016 — edited Feb 19 2016

Hi All,

This is Raju,

I am using Oracle Apex 4.2.6 version. I am facing one issue in my page.

In my application there are some buttons like "Save", "Create", "Schedule Refresh". we are executing some plsql processes using Ajax call while pressing those buttons. We are calling the plsql processes inside the static files using Ajax call.

Those buttons are functioning upto 2 minutes after the page is loaded but those are not functioning if the page is kept idle for more then 2 minutes.

Please provide me any solution on this.

Comments

Tobias Arnhold

Sounds like you are doing strange stuff with APEX. A solution on this kind of description is impossible.

Why don't you do create standard page processes instead of doing advanced AJAX calls you probably can't handle?

What happens if you replace the AJAX functionality (calling PL/SQL stuff) by creating just messages on your page to check if the AJAX process works at all? Is the PL/SQL process being called? Can you see the expected process it in the v$sessions view?

Either way if you want further help we need a better description, screenshots and some code examples.

Regards,


Tobias

raju

Hi Tobias,

Thanks for your update.

We tested the ajax process and it is working fine but it is not working 5 minutes after the page is loaded and that time it is not calling the respective PLSQL process.But initially within 2 minutes after the page is loaded the ajax process is properly calling the respective PLSQL process.

We are using the ajax process to call the standard page PLSQL processes because we are dealing with the customized report where we need to pass multiple ID's for different records within a single page.

we are providing the sample code we are using to call the PLSQL process responsible for saving the report data.

function sumbitdata(){

var lArray1 = [];

var lArray2 = [];

var lArray3 = [];

var lArray4 = [];

var lArray5 = [];

var lArray6 = [];

var lArray7 = [];

var lArray8 = [];

var lArray9 = [];

var lArray10 = [];

var lArray11 = [];

var lArray12 = [];

var lArray13 = [];

$("input[name=f10]").each(function(){

var PrimayKey = $(this).val();

if ($('#FLAG01_'+PrimayKey).val() == 'Y'){

lArray1.push($(this).val());

lArray2.push($('#f11_'+PrimayKey).val()); //SelectList-Status

lArray3.push($('#f12_'+PrimayKey).val()); //Comment 1

lArray4.push($('#f14_'+PrimayKey).val()); //Comment 2

lArray5.push($('#f15_'+PrimayKey).val()); //Comment 3

lArray6.push($('#f17_'+PrimayKey).val()); //FreeText

lArray7.push('VESSEL'); //TableName

}

});

$("input[name=f01]").each(function(){

var PrimayKey = $(this).val();

if ($('#PFLAG01_'+PrimayKey).val() == 'Y'){

lArray1.push($(this).val());

lArray2.push($('#f02_'+PrimayKey).val()); //SelectList-PortRes

lArray3.push($('#f03_'+PrimayKey).val()); //Comment 1

lArray4.push($('#f18_'+PrimayKey).val()); //Comment 2

lArray5.push($('#f19_'+PrimayKey).val()); //Comment 3

lArray6.push($('NULL').val()); //FreeText

lArray7.push('PORT'); //TableName

}

});

$("input[name=f20]").each(function(){

var PrimayKey = $(this).val();

var itemIDarr = $(this).attr('id').split("_");

if ($('#'+itemIDarr[0]+'_FLAG_'+itemIDarr[2]).val() == 'Y'){

lArray8.push($(this).val());

lArray9.push($('#'+itemIDarr[0]+'_FFE_'+itemIDarr[2]).val());

lArray10.push($('#'+itemIDarr[0]+'_TON_'+itemIDarr[2]).val());

lArray11.push($('#'+itemIDarr[0]+'_PLUGS_'+itemIDarr[2]).val());

lArray12.push($('#'+itemIDarr[0]+'_TPF_'+itemIDarr[2]).val());

lArray13.push('VESSEL'); //TableName

}

});

$("input[name=f40]").each(function(){

var PrimayKey = $(this).val();

var itemIDarr = $(this).attr('id').split("_");

if ($('#'+itemIDarr[0]+'_PFLAG_'+itemIDarr[2]).val() == 'Y'){

lArray8.push($(this).val());

lArray9.push($('#'+itemIDarr[0]+'_PFFE_'+itemIDarr[2]).val());

lArray10.push($('#'+itemIDarr[0]+'_PTON_'+itemIDarr[2]).val());

lArray11.push($('#'+itemIDarr[0]+'_PPLUGS_'+itemIDarr[2]).val());

lArray12.push($('#'+itemIDarr[0]+'_PCTR_'+itemIDarr[2]).val());

lArray13.push('PORT'); //TableName

}

});

apex.server.process('SAVEDATA',

{"f01":lArray1,"f02":lArray2,"f03":lArray3,"f04":lArray4,"f05":lArray5,"f06":lArray6,"f07":lArray7,"f08":lArray8,"f09":lArray9,"f10":lArray10,"f11":lArray11,

"f12":lArray12,"f13":lArray13,"x01":UserName},

{"dataType":"text",                     

"success":function(data){  

  if(data.indexOf("<li>") > -1){

   showErrorNotification('1',data);

     }

  else{

  apex.item( "P34_HIDDENNOTIFICATION" ).setValue( data );    

  location.reload();

  }

}                    

}                   

);

//alert(lArray13);

}

Please let us know your suggestion.

Tobias Arnhold

Are you using a classic report to display the data? Are you refreshing this report?

For example this code snippet:

$("input[name=f20]").each(function(){

Will only work as long as the report is not refreshed.

My guess:

You refresh the report and after that your code stops working. In that case you need some jQuery code which also updates the allocated items after the report refresh was executed.

Best regards,

Tobias

raju

Hi Tobias,

Thanks for your input on this.

We are using PLSQL Anonymous Block Report.

No,  the code snippet will work for all the time irrespective of the page is  refreshed or not.

But, our problem is that , every thing is working fine upto 2 minutes after the page is loaded or refreshed but after 2 minutes nothing is working such as we are not getting any result after hitting the SAVE button like that.While investigating we found that upto 2 minutes after the page is getting loaded or refreshed the ajax is able to call the PLSQL process but not after the 2 minutes of idle time.Again if we reload or refresh the page that time it starts working again upto 2 minutes.

Please let us know what we need to do to resolve the issue.

Thank you.

Tobias Arnhold

This seems all a little strange to me.

What is happenig in those two minutes? Yo mean you can refresh the report as aften as you want and after two minutes it just stops to work?

Try to debug the page and check for javascript errors.

2016-02-18 10_52_24-Firebug - Inbox _ Oracle Community.png

Also try to execute your function manually through the browser:

At the end you may have to create an example on apex.oracle.com.

raju

Hi Tobias,

Thanks for your supprot.

The issue is occurring only in production environment.It is not occurring in other environment link TEST or Pre-Production.

So we assume that even if we create the example in apex.oracle.com there might not be the occurrence of the issue there.

The main problem is that we are unable to replicate the issue in other environment like TEST or PRE-PRODUCTION  as in those environments everything is happening properly.

Please let us know your opinion on this.

Thank You.

Trevis

Did you check the Session Timeout in Security Attributes?

raju

Hi Trevis,

Thanks for your support.

Yes..we have check the session timeout in security attributes and after that we have changed to 8hours.But still we are facing same issue.

Please let us know your opinion on this.

1 - 8
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Mar 18 2016
Added on Feb 17 2016
8 comments
454 views