Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
IW Web App Monitoring
#1
Howdy All!

I have a certain customer that after 8 to 10 hours of heavy use, my web application crashes with an EAccessError. 

The stack trace doesn't show anything useful.

If I had to guess, I would guess a possible memory leak but unfortunately FASTMM is practically useless for C++ Builder 10.2.3 and I gave up years ago trying to get it to work (just google my name with FASTMM).

Any how, I was wondering if anyone has written a module or application that monitors a web application for memory usage and somehow restarts it with a command line batch file if necessary?

Or does anyone have any other solution?

Big K - will IW17 have any built-in ability to take a make an IW web application be able to run in multi-process / multi-thread mode as a way of load balancing / restarting processes?

Thanks,

Shane
Reply
#2
Re 17 - thats been in the plans for a long time and still is. Its not in 17.0 though. 17 runs on top of 15.1 and just adds new rendering models.
Reply
#3
I don't have what you're looking for per se, but a long time ago we created a "log server" that would let us log to file or route via TCP to the log server.  The purpose of that was to analyze and display "flagged" information.   It also allowed us to "flush" log info out of the app quickly... it doesn't help if something happens and what you intended to log is in a file buffer somewhere during a crash.  Think OutputDebugString, sort of.

For IW we put in a content handler that would catch "requests" and trigger the app to send a snapshot of current conditions as a part of the log.  We snag some session info and some app info (including summary info, versions, working set mem, etc) and put it in a "dashboard" of sorts.  It's a "built over time" set of hacks I don't send out the door but you might want to try something like that. 

OR (much easier), just make a content handler that returns the info you want in its response.  Write another program that requests the information and does what you want with it (and maybe manage the IW app).  IW for the server, Indy for the requests.  That should be pretty straightforward if the memory results returned by winapi calls (GetProcessMemoryInfo and friends) are good enough for what you need (I haven't used FastMM api calls but they are probably available).

FWIW, I don't really use the mem info I get.  It's just something that was easy to include.  What would be handy, if someone wanted to write it, is code that would "walk" an object (like UserSession) and report what's there <g>.  That's well beyond me, and likely not easy since you wouldn't know what might be in an object like a usersession, but "pie in the sky" to wish for (that's not even an IW deal).

Dan
Reply
#4
Good morning all from Caddo Lake!

Thanks for the answers / suggestions.

I have asked the tech who installs my software to check out the IIS overlapped recycling parameters. I noticed the default was 1740 minutes which is a long time. I have asked them to lower it to every 3 or 4 hours and see if that doesn't help.

All the best,

Shane
Reply
#5
(08-16-2020, 08:53 PM)ShaneStump Wrote: Howdy All!

I have a certain customer that after 8 to 10 hours of heavy use, my web application crashes with an EAccessError. 

The stack trace doesn't show anything useful.

If I had to guess, I would guess a possible memory leak but unfortunately FASTMM is practically useless for C++ Builder 10.2.3 and I gave up years ago trying to get it to work (just google my name with FASTMM).

Any how, I was wondering if anyone has written a module or application that monitors a web application for memory usage and somehow restarts it with a command line batch file if necessary?

Or does anyone have any other solution?

Big K - will IW17 have any built-in ability to take a make an IW web application be able to run in multi-process / multi-thread mode as a way of load balancing / restarting processes?

Thanks,

Shane


Have you seen this?

https://github.com/Atozed/IntraWeb/tree/master/15/C%2B%2B/DemoCPP_FastMM4

I
 created this demo some time ago and IIRC it worked correctly with latest FastMM4....
Reply
#6
For development only I can also suggest that you try Deleaker?

https://www.deleaker.com/

I tested it and find it quite precise and functional. I didn't test it with C++ Builder projects but it claims to work with it as well (and actually it should make no difference once it doesn't actually change the code).

You can test your application using it and see if it leaks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)