how do i get the heap dump of a java application running in flexible environment - app-engine-flexible

Given a java application running in flexible environment, how is it possible to get a heap dump to see the heavy objects?
I would ideally import this into a tool like eclipse mat and analyze the heap dump.
Another great option would be for stackdriver profiler showing it but i just see there cpu profiling but not memory profiling

You can connect to a Flex instance with ssh in a similar fashion that you connect to GCE VM instances. Read more about it here. Once connected you can get the heap dump like you usually do.

Related

Python Bokeh - Is it possible to limit RAM usage when serving?

I want to control the RAM usage of my bokeh dashboards (in Python) while serving. Is there an option to do this from the command line?
Python is not Java, so there are no options built in to Python itself to control memory usage, nor does Bokeh attempt to hand-roll any adhoc solution in this area. The only option I can suggest offhand is to run the Bokeh server in some sort of lightweight VM container that affords some max memory option, or possibly there is a way to use Lifecycle Hooks to actively monitor memory usage yourself, and actively destroy sessions if a limit is exceeded.

Which are the things to consider for running javafx standalone application 24*7*365 days

I am working on one project which is a standalone javafx application. It will run 24*7*365 days continuously.
So, i have a question in mind.
which things we need to consider for running this application smoothly and with high performance for 24*7*365?
Please guides me sir, regarding it.
Details for used things are as follows for Reference :-
Used java version :- 1.8.0_121
Available Ram :- 2GB
Allocated Memory for application :- -Xmx1524M
Hardware Configuration :- Processor - Intel Atom CPUD425# 1.80GHz x 2
OS :- 32 Bit Fedora 15
I will probably state the obvious here, but OutOfMemory errors are the main thing you should worry about. A small glitch in your code/program could make your app die fast or run extremely slow under memory pressure.
I would say that you need to enable garbage collection logs and monitor those. Also is there a way for a javafx app to actually use another instance if the current one is facing issues? There are tools for that under different apps, but not sure about javafx... I mean can you automatically shut down (and collect heap data) the current running application and automatically start a new one (so that later you can analyze what actually happened)? It might not be feasible, and if it's not, you should have enough stress tests before you actually lunch it into production.
One thing you should check first is whether your system suffers from the notorious memory problems that some Linux graphics drivers have. See for example my answer to this question here on SO:
Javafx growing memory usage when drawing image

deploying two EARs in a single weblogic server

I am trying to migrate an application on a Weblogic server which already has an application in it. Please suggest if having two EARs in the same weblogic server is a feasible design
It is perfectly feasible and standard; however, there are one or two reasons why you might not want to do this.
One is file descriptor exhaustion. If one of the applications (EARs) runs out of file descriptors, it will probably crash / render inoperable the entire process, i.e. the entire Weblogic server.
Another is heap memory exhaustion; much the same problem occurs if one of the applications exhausts the maximum available heap memory.
Application servers try to isolate applications from each other, but cannot completely succeed at this due to the limitations of the JVM. Operating systems and virtual machine hypervisors are actually able to do a better job of isolating applications from each other.

BPEL process deployment time

I am using Jdeveloper 11.1.1.3 and Oracle SOA 11.1.1.3, and creating BPEL processes.
Operating system: Windows 2008
RAM: 6 GB
The composite application having 5 BPEL process.
the problem is while deploying the application its taking too much time, average deployment time is more than 10 minutes.
Please suggest me is there any way to reduce the deployment time.
(Except this I do not feel system is running slow ther is any performance issue)
Alot of people have this problem when they are running the server locally, most people suggest that you don't do this incase you have atleast 8gm of RAM.
Most people however run the server externally to their PC however apart from getting a better PC or installing the server externally giving more memory to jdeveloper might help. The other thing to do is to close the applications you don't need. My guess is you have SOAPUI, Database, Jdeveloper, Server, Internet Browser, Documentation and more open.
To increase memory allowance.
Go to [jdevhome]\jdeveloper\ide\bin
Open ide.conf
And increase the memory to a suitable value : AddVMOption -Xmx[number of MB]M
Restart Jdev

Web Based Stack Dump Tool for ASP.NET Using Mdbg?

There is a great presentation by Dan Farino, Chief Systems Architect at MySpace.com, showcasing a web-based stack dump tool that catalogues all threads running in a given process (what they're doing, how long they've been executing, etc.)
Their techniques are also summarized on highscalability.com:
PerfCollector.
Centralized
collection of performance data via
UDP. More reliable than Windows and
allows any client to connect and see
stats.
Web Based Stack Dump Tool.
Can right-click on a problem server
and get stack dump of the .Net
managed threads. Used to have to RDC
into system and attach a debugger and
1/2 later get an answer. Slow,
nonscalable, and tedious. Not just a
stack dump, gives a lot of context
about what the thread is doing.
Troubleshooting is easier because you
can see 90 threads are blocked on a
database so the database may be down.
Web Base Heap Dump Tool.
Dumps all
memory allocations. Very useful for
developers. Save hours of doing it by
hand. • Profiler. Traces a request
from start to finish and produces a
report. See URL, methods, status,
everything that will help you
identify a slow request. Looks at
lock contentions, are a lot of
exceptions being thrown, anything
that might be interesting. Very light
weight. It's running on one box in
every VIP (group of 100 servers) in
production. Samples 1 thread every 10
seconds. Always tracing in
background.
The question is: what tools are required to build a web-based stack dump tool for ASP.NET? For convenience, let's assume that an *.aspx hosted in the target AppDomain, able to output all managed call stacks in that process, is sufficient.
There are a few posts that cover the use of Mdbg (debugger for managed code written entirely in C#/IL that started shipping with CLR 2 SDK) and the mdbgcore assembly typically found in C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin:
http://dotnetdebug.net/2005/11/09/exceptiondbg-v01-debug-your-exceptions/
http://blogs.msdn.com/jmstall/archive/tags/MDbg/default.aspx
http://blogs.msdn.com/vijaysk/archive/2009/11/04/asp-net-debugger-extension-for-iis-7.aspx
Would a solution simply reference this assembly to produce the desired output? What impact would a "list all managed call-stacks" operation have on the running process that's servicing production traffic?
I believe the profiling API of .Net are the way to go.
Look at the SlimTune project on Google Code to have a live sample, with sources, that you can check how to adapt and improve to work in a Asp.NET scenario.
Regards
Massimo
With the profiling API of .Net you have to stop the server and it takes a lot CPU (but it gives you full control over all called methods).
I think the most “light way” solution is to doing this with MDbg, I put together a very small but useful little app called StackDump that does the following:
1) The debugger stops the application and generates a list of all CLR stacks running for the process.
2) The application is started again.
This operation is a quick operation and can (maybe) be executed on a running production server with unchanged production code.
It just 80 lines of .Net code to manage this. I have published the source code on Codeplex.

Resources