Tomcat Server running slow - how to edit server status configurations - tomcat7

Hi I am really new to Tomcat and backend engineering. My Tomcat 7 server status is showing a lot of heap memory being used and my applications are running incredibly slow. Per the photo below, what can I do to update the JVM memory amount? I've read online about editing the catalina.bat or catalina.sh files with updated memory parameters, but my bin folder doesn't have either of these files. So I am not sure what to do, should I create them using command line? I also went in and added parameters to Java. Set the run time parameters to -Xms1024m, but this doesn't effect Tomcat. This server currently runs three applications and will soon need to serve & host a fourth.
Any help on this is greatly appreciated! Thank you!!

I was able to fix this issue. I did not have correct administrative rights to view the proper control panel. Want to leave the answer for anyone else who has this issue.
If adding a .bat file and setting Catalina_Opts and java_opts doesn't work for you, you must go to this Tomcat properties panel and adjust the memory pools there.

Related

PgAdmin runs in desktop mode and I want to change it to server mode

I installed PgAdmin 5.5 version on my Windows 10 computer. Before PgAdmin was opening in default browser and there was an icon in the system tray. Now it runs as a native desktop app. I want to run it as before. Is it changed recently? Did i miss something?
Thank you.
A bit late to the party, but I had the same question (but for v6.x) and can't find much info about it either.
According to this thread in the pgAdmin_support mailing list the option to run just the server seems to be removed which is just flabbergasting.
https://www.postgresql.org/message-id/flat/CA%2BOCxoxF_hw%2BDjB8Cvv1kCP_FOjxrtFD-_cMduaMSGAZwqv6RA%40mail.gmail.com#d678896b1966fa054a500ad1ab29b63f
The way to go probably is to use the Docker although I wonder how much overhead that will bring. That said, you can kind-of work around the lack of default web server by
adapting C:\Program Files\pgAdmin 4\v6\web\config.py so the built-in webserver listens on all network addresses and you can access it from the LAN like this:
DEFAULT_SERVER = '0.0.0.0'
when starting up pgAdmin in the 'application', in the menu go to File \ Runtime \ View log and scroll all the way down, it will have a line that reads something like Application Server URL: http://127.0.0.1:5555/?key=ad836827-6a30-483b-973a-bb2f11a0267e
replacing '127.0.0.1' with the name of your server should allow you to use that url to connect from any machine on your LAN to the pgAdmin service.
Note, you can minimize the pgAdmin 'application' but don't close it because doing so will also close the web-server.

PHP/Apache server setup on Windows 10 machine

Sorry if this is the wrong place for this question but I'm having a tough time trying to setup server with PHP and Apache on my Windows 10 computer. The best tutorial I've found, this video, seems to work until I actually try to view the localhost "site" (not even sure if that's the right word) where "There's Nothing Here".
I'm concerned that it might be because I didn't use the exact same version of PHP and/or apache from the video causing some sort of compatibility error (I used the closest version of each to what was used in the video).
Is there something obvious I've missed here?
Please word your reply in relatively simple terms; not only am a newbie at coding, I imagine others trying to do this same thing in the future are going to be just as inexperienced.
If attempting to go to "localhost" doesn't bring up the "Index Of /" page like in the tutorial it is because the "DirectoryIndex" option in httpd.conf is set to index.php, meaning it will automatically redirect to that page if you go to localhost. It's like the default page that will be accessed. If you want to access the info.php file, you must type "localhost/info.php" in directly. think of the "Apache24/httpd" folder as the "Root" folder of your local server, and everthing in the "Root" directory is accessed with "localhost/NAME_OF_FILE"
It may also be possible that Apache is not starting up again automatically after your computer restarted. To make sure that Apache is running, you can run "ApacheMonitor.exe" found in "Apache24/bin." After running that check the notifications area (that little menu on the right of the task bar that you open up with the tiny arrow) and there should be a small symbol that looks like the icon of the ApacheMonitor application. The symbol should have a green arrow in it if it's running. Otherwise, left-click it and select start.
Another option is to download a more pre-built windows binary of Apache from one of the links on the Using Apache with Windows page. I recommend ApacheHaus. There is still set up required, but when I downloaded it and set it up on my windows 10 it seems to work fine.
I'm not a pro at server set up either, but I hope this helps.

Install a Apache/MySQL/PHP web application locally

We have a web application that is based on Apache, MySQL and PHP. I want to make that available as a desktop application for windows also, installed via MSI. A small .NET application starts a modified xampp package that we deploy and then opens an embedded Chromium-based browser.
Questions:
How do I ensure that I am able to modify the Apache/MySQL/PHP config on run time? The files are stored in Program Files, and UAC of course does not allow me to change them without "Run as administrator". Is there a way to make these files editable during setup? Otherwise I would have to figure out how to start Apache/MySQL with custom config files from a temp directory.
How do I tell the installer to add Apache & MySQL to the firewall exception list, or how do I tell the firewall that applications that listen only locally are not a threat?
I realized I do not want a dirty hack here and tried to do it "right":
I modified the configuration of Apache and MySQL so that everything that changes lies in %APPDATA%. The configuration files are passed as command line arguments.
The current version of Advanced Installer allows Firewall rules to be set on installation.
Actually it wasn't that hard to change the config as I thought it would be and I learned some bits in the process...
I am unsure how this might be helpful, but take a look at inno setup it's free tool to deploy software, and it allow to make custom installation script using pascal, by putting some effort i hope , you can install wamp, add firewall restrictions etc.

Programatically syncing a web project to a Linux server

I have an old web project that gets rsynced to some Ubuntu box using a little script. I'm planning on using Fabric for my deployment but one thing that always bothered me - and won't be different when using Fabric - is that I never got my file access rights right.
So - I'm rsyncing all that project stuff using a different user then the one who's running the project (and of course needs at read/write access for these files) so I'm ending up with new files being created that can only be accessed by the sync-user and not by the project-user. I guess when I'm using Fabric I could "fix" the rights after syncing - so the project-user can read them - but I'm wondering if I got the problem wrong in the first place.
Maybe this isn't a problem with the scripts or the syncing but just some file access rights problem? Since I don't do Linux all day I guess that's an option. :)
I hope I could clearly state my problem. Any ideas?
Only privileged process can set owner of files it can set user id of files it creates to any other than their own.
I don't think it's reasonable to run rsync privileged from security point of view, so you have to run the synchronization as the project user.

Localhost on windows 7 configuration issue

When I am making changes on my localhost, it is not working. I am on windows 7 but when I copy the file in which the changes were made, and try to execute them in Windows XP, its working. I as I asked someone who has a lot of knowledge on this and they said it is a configuration issue.
Someone else told me it was because of output caching, so I disabled everything and tried, even then there was no response. Can anyone tell me how do I go about it?
This was because of caching issue.
Navigate to Control Panel\All Control Panel Items\Administrative Tools\IIS Configuration Manager, select Output caching, then add new rule with follow parameters:
Insert types of files, you are changing(.aspx,.php) in File name extension field and simply unselect all types of caching. Then restart server and it should work now
I could hardly understand your word, so I think your very first task is to make sure you understand IIS and how to start troubleshooting.
Without a clearer description on the problem, nobody can provide you useful information on how to resolve it.
If you like, open a support case with Microsoft support team and talk to the support engineer about your issue.
http://support.microsoft.com

Resources