Debugging Rails Server with RubyMine 5: Which server? - rubymine

Any recommendations for which server is the best to use for RubyMine debugging?
Webrick works correctly, but is slow to start.
Unicorn starts quickly, but the debugger doesn't work as the session quickly times out. better_errors gem doesn't play well with unicorn.
Any others to try?
UPDATE
Thin seems to work great

Full disclaimer, I installed rubymine today, and know very little about it... BUT, I did just read this about rubymine, unicorn, and timeouts which may help: Run/Debug Configuration: Rails
tl;dr:
if ENV['IDE_PROCESS_DISPATCHER']
timeout 30 * 60 * 60 * 24
end

Related

jQuery-File-Upload fails with somewhat large files

Trying to use this project: https://github.com/blueimp/jQuery-File-Upload/
Our application server is a FreeBSD 11.2 with Apache 2.4.39 and PHP 7.2.17. I've downloaded their demo and receive the error net::ERR_CONNECTION_RESET in the browser console when trying to upload anything large enough to exceed 22 seconds exactly. It does appear to be server related as I've downloaded the same demo to another CentOS7 server where same file upload succeeds.
Although I have checked all my PHP variables for max upload size and memory limit, etc., would this demo be subject to PHP variables? I found the RequestReadTimeout Apache setting in the server that fails, not present in the working server, so I thought it could be the culprit, but I changed this setting from...
RequestReadTimeout header=20-40,MinRate=500 body=20,MinRate=500
To this...
RequestReadTimeout header=60-120,MinRate=500 body=120,MinRate=500
...and restarted Apache, but the same result. The developers on this server believe this issue only started after recent updates to the server were done that included Apache 2.4.33 upgraded to Apache 2.4.39. The PHP version did not change, however, there were many other packages updated as well as security patches to the FreeBSD OS. Can someone suggest what could fix this issue?
--UPDATE--
Okay, this is easily duplicated. I spun up a VM with a fresh install of FreeBSD 11.2, installed Apache 2.4.39 and the demo of this project. I adjusted these settings in the demo app to allow a large mp4 video to be uploaded...
acceptFileTypes: /(\.|\/)(gif|jpe?g|png|mp4)$/i,
maxFileSize: 999000000,
...and receive the same Unknown error at exactly 22 seconds into the download progress of an mp4 file of ~493MB. There must be a setting in Apache that needs to allow more time or other limit. And perhaps a change to the FreeBSD Apache 2.4 port somewhere between 2.4.33 and 2.4.39. My developers say this all started after that update.
Well, the RequestReadTimeout setting in Apache was the culprit. I had to completely disable, now it works.
same issue here - to fix, on a Centos 7 system, comment out this line:
LoadModule reqtimeout_module modules/mod_reqtimeout.so
from the 00-base.conf file, then restart httpd

Is there a way to set a timeout period on a Minecraft client when connecting to a server? This is due to Eclipse debugging

I recently set up Eclipse debugging for developing Bukkit plugins. It's really awesome being able to see what variables are changing and on what breakpoints, but my main concern is, when debugging with clients connected to my test Minecraft server, they timeout. This is due to Eclipse, when encountering a breakpoint, pauses the servers main thread and timeouts the clients after 30 seconds. I've set the server so it doesn't shut down after 60 seconds, but the clients always disconnect. Is there a client-side option to set timeout periods? Or is it embedded in the way TCP packets work? - Or just another workaround to this?
I know this is 3+ years later but I've been struggling with this myself (Using Intellij Idea instead of Eclipse though) and I've found a solution to this, which I'll post here in case anyone else comes across this. Since the readTimeout was not behaving as I wanted it to do, what I did is the following:
a) To set timeout on the client side:
Install Forge for the spigot server version you are developing (You can still join spigot based servers for plugin development).
Install RandomPatches mod (allows you to edit hard-coded vanilla minecraft variables)
Edit RandomPatches config file (randompatches.toml) and set "read_timeout_seconds" based on your liking (This should only happen for the client-side when debugging a plugin. You should not change it for production servers ofcourse).
b) To set timeout on the server side:
Edit spigot.yml file and set "timeout-time" based on your liking. If you only change the client-side, server is going to crash once this value is surpassed and you'll need to start the server again.
c) Voila! Enjoy debugging for as long as you like!

Why wont the Zed Attack Proxy (ZAP) start

I have ZAP installed on a build server (Windows 2008 R2) and on my Windows 7 desktop, and Zap only occasionally starts. I click on the program and my cursor shows it is waiting for a second or 2 and then nothing. Attempting to run from the command line will also not show any signs of running.
Then just out of the blue the program may launch.
Is it possible it just takes forever to start. I left my computer running and the next day when I came to work there was the UI.
I get the same results if I try to run the program in the headless state. with the -daemon flag. it never starts, it never shows up in the task manager, as an application or a process
thanks Noel
Turns out there were 2 issues. The first was that the tool was taking 4-5 minutes to start (I timed it several times at around 4m 30s). I did not have the patience to wait, so I would try to start it again. Attempting to start the application when one had started, but no UI was showing invariable caused the application to hang.
Secondly if you start it as a headless application there is no way to stop it. So if you have it headless and then try to start the application it will cause it to hang. THe easiest way to tell if it is running is to follow the log information being written out as suggested by Psiion above in his link.
To kill the process, look in the task manager for the java process and kill it.
Just in case anyone stumbles across this post, my problem was I didn't have Java installed. I had removed it a few months ago due to security considerations.
You can stop your browsesr using Java easily by using the Java control panel http://www.java.com/en/download/help/disable_browser.xml
I was facing a similar issue, the ZAP tool was working fine on my local machine but was displaying erratic behavior on the Virtual Machine. I tried all the previously mentioned suggestions but none of them could mitigate the issue. Upon checking the log files i found out that the HSQLDB files were being locked even after closing the tool or even if the tool did not start. I eventually figured out that the difference between the 2 environments was just the operating system. My local had Windows 10 pro while the VM had Windows 10 enterprise. So in case if any one else is facing similar, kindly check the operating system.

IBM RAD 7.5 ... why does it take WebSphere so long to start / publish / republish / debug?

I'm developing an EAR/WAR application with IBM RAD 7.5 and WebSphere 7.
When I run my app on WebSphere 7 within "eclispe", it take forever for WebSphere to start in "Run" mode (2 or 3 minutes). Much longer to start in "Debug" mode (5 to 10 minutes).
I have 'publish automatically' turned off, so I republish manually, and that too take a long long time.
Am I doing something wrong, or is there anyway to speed thing up?
Thanks,
Rob
Try setting metadata-complete="true" in your web.xml I experienced significant improvements doing this.
I wonder if you're hitting memory limits on your system and perhaps doing a lot of swapping. My WebSphere 6.1 under RAD 8 seems to start in an amount of time consistent with WebSphere by itself.
I would suggest you check the Heap for the test environment.
Personally build automatically and auto-publish should be turned off, You run the publish as and when you need it.
This one is still a good reference
http://www.ibm.com/developerworks/wikis/download/attachments/113606723/radtipsv754.pdf?version=1
Sometimes when it takes 5-10 to publish in debug mode, i either revert to export and install via the admin console or use wsadmin scripts to install the application.
Also turn on the heap config for RAD (one of the preference allows you to show this). You might be able to make some inferences if RAD is hitting into memory issues.
HTH
Manglu

How to Speed Up IBM Rational Application Developer/Rational Software Architect

I want to know how can I speed up RSA 7.5( which is an IDE by IBM having eclipse under the hood with websphere server runtimes) mainly server start. The first time I start it after computer reboot it loads after, but after that it takes for ever to start/stop the server. The debug mode for server takes for ever to start.
I am using server 7 run time for IBM RSA 7.5.
So bascially RAD/RSA has websphere run times which allows to configure the server runtime start/stop within RAD/RSA. The run time allows you to develop webapps and test time on the server on deploy it on the websphere run time.
The problem I am facing is with the websphere runtime which works fine after computer reboot but is very slow after several deployments/publishing of the same web app.
I would be grateful you give performance tips for speed up RSA server start/shutdown and overall performance tips. I have plenty of memory like 12 GB with i7 Core 6 cores on Win7.
Of course of your are running the server in debug mode it's going to be a lot slower, but you have a few options like putting the server in development mode or doing some fine tuning as to which applications should start. Take a look at these articles:
Rational Application Developer Performance Tips- Case study: Tuning WebSphere Application Server V7 and V8 for performance
Performance tuning WebSphere Application Server 7 on AIX 6.1
WebSphere tuning for the impatient: How to get 80% of the performance improvement with 20% of the effort
WebSphere Performance Monitoring & Tuning
Some of these are a bit dated but they have some good information that may still be relevent to your issues; especially the first one.
Make sure that the workspaces are stored on a local disk.
edit - forgot this: buy a SSD disk. It makes a huge difference when developing.
If you have a virus scanner, disable on-access scan in the SDP installation directory including the server plugin, and in all your workspaces.
Uninstall any applications (ears) you are not using - the more you have installed the longer the server takes to startup. If your server is taking too long to start, RAD/RSA will assume it has timed out and stop it before it finishes starting - if this happens then increase the start timeout limit by double-clicking your server in the Servers tab and modifying the values in the Timeouts section.
Oh, and If you have a lot of datasources defined, and autostarting connection pools with alot of connections, it may also take a while to start the pools.
But that can't explain it all... I haven't tested, but since WAS and RSA seems to spend a lot of time doing absolutely nothing, I am starting to suspect it's trying to download schemas or something. If you have the time, you could try to trace and see if you find something like that...
I came across this post while trying to troubleshoot my RSA performance. I figured I would update it with a recommendation for improving performance on RSA 8.0.4.
http://publib.boulder.ibm.com/infocenter/radhelp/v8/index.jsp?topic=/com.ibm.performance.doc/topics/cperformance.html has some excellent tips on improving performance in the "Performance Tips" section. After implementing just some of the "Always" tips I've found my memory reducing significantly and performance being much faster.
You should start with the "Always" tips and then move to the "Sometimes" and "Rarely" ones for finer tuning.