Getting time out while running on msmq queue on more application hit - msmq

We have batch file for processing the applications through msmq, when the application count is more for ex: 40 at at a time, when it is picking the application in queue, remaining applications are getting time out, as the waiting time for all application is same..

Try bumping up the QMThreadNo registry value to increase the thread pool size.

Related

MongoDB close to max memory on a PaaS

We run a small NodeJS app that manages subscriptions for our mobile apps. It's backend is a MongoDB with only 100MB of memory. Currently the data size is around 120MB. It's all hosted on a PaaS called Nodechef.
After running for about a week the Mongo server hit 98MB/100MB in memory usage. Not knowing what would happen, we forced a restart and it dropped back to 70MB or so. It's slowly creeping back up.
A few questions:
Is this normal behavior for Mongo to keep growing in memory up to the max?
What happens when it hits max? Will it reboot or crash, or do some kind of garbage collection?
Is restarting weekly a pretty normal fix for this type of issue?
According to this you can try setting hostInfo.system.memLimitMB but I am surprised MongoDB runs at all with 100 MB available memory (if this is accurate).
If the MongoDB process runs out of memory (i.e. requests a memory allocation which is denied) it is likely to immediately terminate.
This is a Nodechef specific answer based on how they handle this. Other PaaS may handle differently:
"When it hits 125%, SWAP included, it will auto restart itself. It does a graceful shutdown so there should not be any problems there.
In regards to if this is normal, depends, i have seen cases where the app does not close cursors properly causing a cursor leak on the database server which results in memory continuously increasing. Another issue could also be memory fragmentation on the server itself. As long as the restarts are not happening hourly, you are more than fine. Taking a couple week to hit its peak is ok."

Azure WebJob - Limit Processing Time to Specific Hours

I have an MVC web site, a storage queue and a WebJob. Users can request the generation of a set of reports by clicking a button on the web page. This inserts a message into the storage queue. In the past, the WebJob ran continuously and processed those requests fine. But the demand and size of the reports has grown to the point where the WebJob is slowing down the web app. I would like to still place the request message in the queue, but delay processing of all requests until the evening, when the web app is mostly idle. This would allow me to continue using the WebJob code and QueueTrigger functionality without having to waste resources by moving to a dedicated Worker Role, etc. The reports don't need to be generated immediately, so a delay is acceptable.
I don't see a built-in way to set a time window on processing. The only thing I have found is a powershell cmdlet for starting and stopping WebJobs (Start-AzureWebsiteJob / Stop-AzureWebsiteJob). So I was thinking that I could create a scheduled powershell job that runs at midnight, starts the webjob, lets it run, and then runs again early in the AM and stops it.
Does anyone know of a better option than this? Anything more "official" that perhaps I could not find?
One possible solution would be to hide the messages in the queue for a certain amount of time when they are inserted.
If you're using AddMessage method, you can specify this timespan value in initialVisibilityDelay parameter.
What this will do is ensure that the messages are not immediately visible in the queue to be picked by WebJob and will become visible only when this timespan elapses.
Will such a solution work for you?
Maybe I didn't fully understand your question, but couldn't you use "Triggered" WebJob that is triggered by CRON schedule? You can then limit it to specific hours
0 * 20-22 * * *
This example will run every minute from 8pm to 10pm

Eclipse Debugger Multithreading

Suppose I have a thread inside my application that repeatedly sleeps for x number of seconds until woken up repeatedly by interrupts coming from activity it is monitoring.
Now the number of times it enters sleep can be very large like 50-100 times. And the time it sleeps everytime can be substantial like 20 secs.
So for this thread to come out of this waiting loop, it takes large amount of times thereby inhibiting my ability to debug.
What I would like to ideally do is for me to make Eclipse debugger manually throw InterruptException so that I can wake up the thread much faster each time it enters sleep.
Is this possible with Eclipse debugger?

Deploy app that works on background on WAS

I made an app that I'm deploying as EAR on WAS 8.5. This app works as an app that constantly checks on a DataQueue and transfer whatever message it finds to an MQ. Since I've been testing it, I realized that if I start it, it remains starting the application indefinitely (since it's an endless loop that checks on the queue). Even without the loop, the read() function of the dataqueue reads indefinitely until it finds a message, what also makes the starting of the app to don't end.
Reflecting on it, I realize that an EAR (with WARs, JARs, etc) it's an app that expects a request (if not all, most of the time). So if it's an endless loop, it won't end the starting of the EAR.
Maybe there's another way to deploy this application on WAS. Is there a way to deploy the app so it will be like a background process that does everything I previously mentioned?
There are 2 solutions to this:
Use MDBs and ensure that you receive the message is a message listener thread. This will ensure that threading is completely taken care by WAS.
Here is an article about using threads in WAS: http://wpcertification.blogspot.in/2010/09/developing-multi-threaded-application.html .

iOS FTP concurrent upload and download

I am trying to write a code in which i have to create 2 parallel threads (Which is running inside a dispatch serial queue) 1 thread will upload and another thread will download the file from the server. Both of the upload and download progress is going to be updated on another screen with bytes upload and downloaded.
But I am facing some strange issues:-
As soon as I create secondary threads my functions returns to the dispatch Serial Queues and it starts another serial task scehduled instead of waiting for 2 current parallel Tasks to complete first.
As soon as the Download Threads starts the upload Thread Stops uploading file and returns -1 during Writeto server.
I am using Apple SimpleFTP example and trying to run it in 2 parallel threads 1 is for put and second for get.
Any Idea why the Upload stops while downloading file from server(I have made 2 different connnections to FTP server as well)
Advance Thanks for any help.
solved the issue using the Syncronous FTP request. The run loop run function was blocking the other thread from calling the stream delegate function.