'System.OutOfMemoryException' when running a detached application

'System.OutOfMemoryException' when running a detached application

  
We are trying to test the detach processes. We are able to download and build the source code, but when we run it we get the 'System.OutOfMemoryException' error (see below).

It happens even with a brand new application (from style guide).

The only way we were able to run the detached application was to create a BLANK application with some simple code, but when we start adding references (for example, if we just add a reference to the “Enterprise” eSpace), we get the error.

Using Visual Studio 2008 to build and run.

We already spent a lot of time with this issue, with no success. Does anybody can help us ???


Thanks in advance.
Ricardo.


Server Error in '/' Application.


Configuration Error

Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: Exception of type 'System.OutOfMemoryException' was thrown.

Source Error:


				Line 20:     <sessionState cookieless="false" regenerateExpiredSessionId="true"  mode="Custom" customProvider="OutSystemsSessionProvider">
Line 21:       <providers>
Line 22:         <add name="OutSystemsSessionProvider" type="OutSystems.HubEdition.RuntimePlatform.SessionState.SqlSessionStateStore" />
Line 23:       </providers>
Line 24:     </sessionState>

Source File: C:\Documents and Settings\vmuser\Desktop\eSpace_v2_Source[1]\eSpace\web.config    Line: 22


Version Information: Microsoft .NET Framework Version:2.0.50727.3053; ASP.NET Version:2.0.50727.3053

Hi Ricardo,

I am sorry to hear about this issue. From the talk I just had with our support department, it would seem that the IIS Application Pool you're deploying the application to isn't properly configured/tuned.

What we would suggest is for you to download the Platform Server 5.1 - .NET Install Checklist document and do the following:

1. If a security warning shows up, click it and allow blocked content;
2. Select the operating system of the server where you're deploying the application to;
3. Go to the Tuning and Security Check list section, and execute it step by step.

One note, though: since you're probably deploying the application to a different IIS Application pool, whenever you find a mention to "OutSystemsApplication", replace it with the name of the Application Poolyou're using - or, if you don't know it, select All Application Pools.

After doing this, hopefully your issue will now be solved.

However, do let us know if that solves your problem or not, since if that doesn't solve it, our support department will try to get in touch with you directly, in order to better understand and troubleshoot your situation.

Hope this helps.

Best regards,

Paulo Tavares

Hi Paulo,
 

Thanks for your feedback. I have followed all the check-list in a brand new server, but I still get the same error. I´m sure I must be doing something wrong, but I can´t find out what it is !

Here is a step-by-step to reproduce what I am doing, maybe just looking at it you will see what I am missing:

 

1) In Service Studio, create a new application (from Style Guide). Name it "DetachTest", and 1-Click Publish it to localhost.

2) Test the application, opening it from Service Studio or Service Center - it runs ok.

3) Test the application from the browser, using URL http://localhost/DetachTest/Home.aspx - works ok too.

4) In Service Center, open the "DetachTest" eSpace and click "Download Source" and "Download". I attached here the "DetachTest_v1_Source.zip" file that I got from this step.

5) Create a new folder "DetachTestSource" in c:\inetpub\wwwroot and unzip this file there.

6) In IIS Manager, create a new Virtual Directory, call it DetachTest and point to "C:\Inetpub\wwwroot\DetachTestSource\DetachTest"

7) From IE, open the URL http://localhost/DetachTestSource/Home.aspx

Bingo ! Here I get the 'System.OutOfMemoryException'. I also tried to rebuild the application with Visual Studio 2008, deploy it to a different server, but I always get this error.

Please, can you help me to find out what I am doing wrong ?


 

Hi Ricardo.

Thanks for your prompt reply, and sorry for the delay.

Indeed it seems that you're doing the right things, and after talking with our support department, it was decided that they will get directly in touch with you to troubleshoot this problem.

Regards,

Paulo Tavares
Hi

I have been able to replicate the OutOfMemory error. So far I have not been able to overcome it, and do not know if it is possible without changing the generated code.
Will keep you posted, though.

Cheers,
Acácio

Hello all,

Months ago Daniel Lourenço guided me to learn how to detached application and I fastly encounter this System.OutOfMemoryException error. Looked for google and I thought it required tunning of the IIS like Paulo Tavares mentioned. But after several days of struggle I got the following conclusion:
-It happened when your project have a with circular reference "referência circular", for instance Enterprice with Enterprise Manager.. Audit Events with Enterprise Manager.

I don't know how Ricardo Ardito tested, as you said once you added a reference to Enterprise you got the error.. (I'm assuming you left all other components in Service Center and tried to detach only the DetachTest.oml)

But what I tried was, since there's no Solution component in IIS, I had to Build eSpace one by one, in their nature order... (first the ones without Producer, then others, etc).. everything goes well even with reference to other eSpace. The thing goes ugly when it goes to Enterprice or Enterprise Manager or AuditEvents!!! Since they have circular reference there's no way you can tell which one should be Build first...


The work around I found (not fully tested), but indead doesn't solve the problem, is to add those eSpace into IIS without any circular reference, ie for example: Enterprise Manager (without reference to Enterprise or AuditEvents), then add Enterprise, then AuditEvents. Now delete EM from the IIS Pool and
now you can build the original one Enterprise Manager (with all the reference).. somehow, in this way the IIS won't go Out of Memory. Strangely but works. After that I keep adding eSpace (that use Enterprise) to the pool and it works fine. But like I said this work around is not acceptable.

2) I also found another problem... BPT popup box doesn't work... when opening a browser I get a JavaScript error saying that it can't find the EPA_Taskbox, even I have it built like any other eSpace.

 

I never ended the conversation with Daniel Lourenço (sorry) because I went to another project, but now I'm back and hopefully we can find a solution.

Please help,
Victor Santos

Hello,

Other than BPT not working I did a few more test and found that the Timer also doesn't work..
According to The Detach Process for .NET and Agile Platform - Technology Independence the Detach Process should support Timers.

What I did was create an empty eSpace with a Timer and a webscreen that wake the timer up. Also scheduled the timer to activate every 15 minutes. But it doesn't work.
It only work if I start OutSystems Deployment Controller Service and OutSystems Scheduler Service together.
How come?

Thank you

Hi Victor,

Thanks for your replies. Indeed, the issues you seem to describe are either configuration problems, or bugs.

Since we have no way to follow up in such detail and thoroughness on this topic - since it will probably involve getting more detailed information about your environment and applications - I am forwarding this to our support team, and if possible I suggest sending them an e-mail at support@outsystems.com so that they can contact you directly about this subject, and hopefully get to the bottom of it!

Regards,

Paulo Tavares
Hello all

In fact there is a problem with EnterpriseManager when detaching its source code, thus causing the OutOfMemory error. At this point I have not been able to follow-up on this ("valores mais altos se levantam") but as soon as I can I will let you know the conclusions.

Cheers,
Hello all

The problem that caused this error was identified and is fixed since Agile Platform Server 5.1.0.23. In order to sucessfully detach an eSpace affected by this error, simply:
  • Patch your Server to Agile Platform Server 5.1.0.23 (or newer);
  • Republish the affected eSpace(s);
  • Download the source code again and publish it in IIS.
I just tested it and it is working properly. Please post something here if you run into this problem again with a version above 5.1.0.23.

Cheers,
Hello Acácio,

I have resumed my tests, following your last instructions (upgraded Service Studio, Platform Server and Service Center to 5.1.0.23, and republished the eSpaces) and your recently published document on this subject (http://www.outsystems.com/goto/technote-detach-dotnet). Unfortunately, I still get the same error (OutOfMemoryException).

Now I don´t know if the problem is the downloaded source code, or in my deploy process/environment. So, I would ask if you could send me your source code package (the one that works in your environment), so I can test the deploy process (with Visual Studio 2008) in my environment. Is it possible ?

Thanks,
Ricardo.
Hi Ricardo

I have uploaded the 4 eSpaces from EnterpriseManager, the ones I used to do the experiments. Please find them at:
  • http://dl.dropbox.com/u/2308781/Detach/AuditEvents_v1_Source.zip
  • http://dl.dropbox.com/u/2308781/Detach/Enterprise_v1_Source.zip
  • http://dl.dropbox.com/u/2308781/Detach/EnterpriseManager_v1_Source.zip
  • http://dl.dropbox.com/u/2308781/Detach/RichWidgets_v1_Source.zip
(I will delete them after a week or so).

Note that you may have had the problem because the eSpaces were not properly republished - before downloading the source above, I suggest that you create a solution with all your eSpaces, and republish it using the option Publish with full recompilations.

Please let us know how it goes. 

Cheers,
That´s it !

It seems the problem was really this "Publish with full recompilations" option, that I hadn´t checked before, so it seems I was testing with the previous version.

So sorry, Acácio, but it is working perfectly now.

Thanks a lot,
Ricardo.