Why running PhpStorm 2021 I got error of lacking memory in my OS? - phpstorm

Working in PhpStorm 2021 I got error of lacking memory in IDE in my Kubuntu 20 (I installed it 3-4 months ago). I ignored it but after restarting I failed to run the OS.
$ /opt/PhpStorm-2021.1.4/PhpStorm-211.7628.25/bin/phpstorm.sh
Error occurred during initialization of VM
Initial heap size set to a larger value than the maximum heap size
I cleared all directories inside of /home/user/.cache/JetBrains as I supposed that my cache raised to big size so I cleared space in root of my OS.
I upgraded my OS with the following command:
sudo apt-get update
sudo apt-get upgrade
but after restarting I still got the same error.
I have in my OS:
$ free
total used free shared buff/cache available
Mem: 8067380 1399884 4747912 198804 1919584 6202076
Swap: 2104476 0 2104476
$ lsb_release -d; uname -r; uname -i
Description: Ubuntu 20.04.3 LTS
5.11.0-37-generic
x86_64
$ df -HT
Filesystem Type Size Used Avail Use% Mounted on
udev devtmpfs 4.1G 0 4.1G 0% /dev
tmpfs tmpfs 827M 2.1M 825M 1% /run
/dev/sdb2 ext4 53G 28G 23G 55% / // I HAVE A LOT OF FREE SPACE
tmpfs tmpfs 4.2G 0 4.2G 0% /dev/shm
tmpfs tmpfs 5.3M 4.1k 5.3M 1% /run/lock
tmpfs tmpfs 4.2G 0 4.2G 0% /sys/fs/cgroup
/dev/sdb7 ext4 30G 13G 16G 44% /var
/dev/sdb1 ext4 339M 208M 106M 67% /boot
/dev/loop0 squashfs 155M 155M 0 100% /snap/chromium/1864
/dev/sdb8 fuseblk 399G 151G 248G 38% /mnt/_work_sdb8
/dev/loop2 squashfs 59M 59M 0 100% /snap/core18/2253
/dev/loop1 squashfs 140M 140M 0 100% /snap/chromium/1878
/dev/loop4 squashfs 261M 261M 0 100% /snap/gnome-3-38-2004/87
/dev/loop7 squashfs 66M 66M 0 100% /snap/core20/1328
/dev/loop3 squashfs 59M 59M 0 100% /snap/core18/2284
/dev/loop6 squashfs 173M 173M 0 100% /snap/gnome-3-28-1804/161
/dev/loop5 squashfs 132k 132k 0 100% /snap/bare/5
/dev/loop8 squashfs 69M 69M 0 100% /snap/gtk-common-themes/1515
/dev/loop9 squashfs 69M 69M 0 100% /snap/gtk-common-themes/1519
/dev/loop10 squashfs 46M 46M 0 100% /snap/snapd/14295
/dev/loop11 squashfs 66M 66M 0 100% /snap/core20/1270
/dev/loop12 squashfs 46M 46M 0 100% /snap/snapd/14549
/dev/sda6 fuseblk 237G 122G 115G 52% /mnt/Work_sda6
/dev/sda1 fuseblk 65G 58G 7.2G 89% /mnt/Win_sda1
/dev/sda8 fuseblk 628G 626G 2.7G 100% /mnt/Media_sda8
tmpfs tmpfs 827M 17k 827M 1% /run/user/1000
I found file /home/user/.config/JetBrains/PhpStorm2021.2/phpstorm64.vmoptions
-Xmx984m
-Xms128m
-XX:ReservedCodeCacheSize=512m
-XX:+UseG1GC
-XX:SoftRefLRUPolicyMSPerMB=50
-XX:CICompilerCount=2
-XX:+HeapDumpOnOutOfMemoryError
-XX:-OmitStackTraceInFastThrow
-ea
-Dsun.io.useCanonCaches=false
-Djdk.http.auth.tunneling.disabledSchemes=""
-Djdk.attach.allowAttachSelf=true
-Djdk.module.illegalAccess.silent=true
-Dkotlinx.coroutines.debug=off
-Dsun.tools.attach.tmp.only=true
Has it relative options? I tried to modify it (I googled some refs in net) :
-Xms5096m
-Xmx4096m
-XX:NewSize=1024m
-XX:MaxNewSize=1512m
-XX:ReservedCodeCacheSize=512m
-XX:+UseG1GC
-XX:SoftRefLRUPolicyMSPerMB=50
-XX:CICompilerCount=2
-XX:+HeapDumpOnOutOfMemoryError
-XX:-OmitStackTraceInFastThrow
-ea
-Dsun.io.useCanonCaches=false
-Djdk.http.auth.tunneling.disabledSchemes=""
-Djdk.attach.allowAttachSelf=true
-Djdk.module.illegalAccess.silent=true
-Dkotlinx.coroutines.debug=off
-Dsun.tools.attach.tmp.only=true
Restated OS and the same error.
I have a SSD (sdb and on Linux partitions are located on it) and HDD (sda) on my laptop and I do not use any virtual machines...
What could raise this error and how it can be fixed ?

Related

Cannot run docker engine in ubuntu18

First I run a offical MySQL image with Docker, suddently I can't connect to MySQL with
"Can not read response from server. Expected to read 4 bytes, read 0 bytes before connection was unexpectedly lost".
when I run docker ps, the contianer is runnning, but I can't exec -it it.So i try to restart docker and i got this :
Job for docker.service failed because the control process exited with error code.
See systemctl status docker.service and journalctl -xe for details.
when I try to start docker engine by systemctl start docker
● docker.service - Docker Application Container Engine Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Fri 2022-11-25 10:24:22 CST; 9s ago Docs: https://docs.docker.com Process: 952 ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock (code=exited, status=1/FAILURE) Main PID: 952 (code=exited, status=1/FAILURE)
then I try "sudo dockerd", Console tells me follow
chmod /var/lib/docker: read-only file system
this is my df -T -H output:
Filesystem Type Size Used Avail Use% Mounted on udev devtmpfs 126G 0 126G 0% /dev tmpfs tmpfs 26G 4.1M 26G 1% /run /dev/sda2 ext4 879G 150G 685G 18% / tmpfs tmpfs 126G 0 126G 0% /dev/shm tmpfs tmpfs 5.0M 4.0K 5.0M 1% /run/lock tmpfs tmpfs 126G 0 126G 0% /sys/fs/cgroup /dev/loop1 squashfs 1.5M 1.5M 0 100% /snap/gnome-system-monitor/181 /dev/loop2 squashfs 64M 64M 0 100% /snap/core20/1695 /dev/loop3 squashfs 347M 347M 0 100% /snap/gnome-3-38-2004/119 /dev/loop0 squashfs 56M 56M 0 100% /snap/core18/2620 /dev/loop5 squashfs 415M 415M 0 100% /snap/gnome-42-2204/29 /dev/loop4 squashfs 347M 347M 0 100% /snap/gnome-3-38-2004/115 /dev/loop6 squashfs 2.7M 2.7M 0 100% /snap/gnome-calculator/920 /dev/loop7 squashfs 512K 512K 0 100% /snap/gnome-characters/781 /dev/sda1 vfat 379M 4.4M 375M 2% /boot/efi /dev/loop8 squashfs 64M 64M 0 100% /snap/core20/1634 /dev/loop9 squashfs 92M 92M 0 100% /snap/gtk-common-themes/1535 /dev/loop11 squashfs 2.7M 2.7M 0 100% /snap/gnome-system-monitor/178 /dev/loop12 squashfs 128K 128K 0 100% /snap/bare/5 /dev/loop14 squashfs 6.4M 6.4M 0 100% /snap/curl/1256 /dev/loop15 squashfs 768K 768K 0 100% /snap/gnome-characters/741 /dev/loop16 squashfs 768K 768K 0 100% /snap/gnome-logs/115 /dev/loop17 squashfs 71M 71M 0 100% /snap/core22/275 /dev/loop18 squashfs 219M 219M 0 100% /snap/gnome-3-34-1804/72 /dev/loop19 squashfs 82M 82M 0 100% /snap/gtk-common-themes/1534 /dev/loop20 squashfs 2.5M 2.5M 0 100% /snap/gnome-calculator/884 /dev/loop21 squashfs 48M 48M 0 100% /snap/snapd/17336 /dev/loop22 squashfs 73M 73M 0 100% /snap/core22/310 /dev/loop23 squashfs 6.4M 6.4M 0 100% /snap/curl/1113 /dev/loop24 squashfs 640K 640K 0 100% /snap/gnome-logs/112 /dev/loop25 squashfs 219M 219M 0 100% /snap/gnome-3-34-1804/77 /dev/sdc2 ext4 15T 637G 14T 5% /data2 /dev/sdb1 ext4 880G 394G 441G 48% /home /dev/sdc1 ext4 15T 586G 14T 5% /data1 tmpfs tmpfs 26G 32K 26G 1% /run/user/121 tmpfs tmpfs 26G 52K 26G 1% /run/user/1000 /dev/loop26 squashfs 50M 50M 0 100% /snap/snapd/17576 /dev/loop13 squashfs 447M 447M 0 100% /snap/gnome-42-2204/44 /dev/loop27 squashfs 56M 56M 0 100% /snap/core18/2632
I'm wondering why /var/ib/docker become a read-only file system,and how can i run docker engine
Since you haven't mentioned how you have installed Docker, I'm assuming that you installed using snap and that your OS is ubuntu.
If that's the case, try to remove docker from snap:
snap remove docker
And then remove the docker directory:
rm -R /var/lib/docker
sudo apt-get remove docker docker-engine docker.io
Install official docker: https://docs.docker.com/install/linux/docker-ce/ubuntu/

Unable to start mysql on ubuntu

I'm trying to mysql, but I'm receiving this error:
sudo /etc/init.d/apache2 start
* Starting web server apache2 *
ubuntu#ip-172-31-19-47:/var/www/html/anunciolocal$ sudo /etc/init.d/mysql start
* /etc/init.d/mysql: ERROR: The partition with /var/lib/mysql is too full!
When I checked my memory:
ubuntu#ip-172-31-19-47:~$ df -h
Filesystem Size Used Avail Use% Mounted on
udev 996M 12K 996M 1% /dev
tmpfs 201M 344K 200M 1% /run
/dev/xvda1 16G 15G 307M 98% /
none 4.0K 0 4.0K 0% /sys/fs/cgroup
none 5.0M 0 5.0M 0% /run/lock
none 1001M 0 1001M 0% /run/shm
none 100M 0 100M 0% /run/user
overflow 1.0M 992K 32K 97% /tmp
How do I solve it?
Try running it this way
sudo service mysql stop
sudo service mysql start
/etc/init.d/mysql: ERROR: The partition with /var/lib/mysql is too full!
this is why you cant start mysql
please clear /dev/xvda1 the disk has no enough space

How can I create a custom sized disk using LXC

Good day,
I have been looking through a lot of documentation and nothing really appears to confirm how to expand the disk size of the the LXC containers that I am spinning up..
Here is what I have tried so far,
I warn you the items below look unrelated, but confirm my thoughts that it is and should be possible to alter the disk size.
LXC how to change network adapters
I followed the document with hopes that I could modify the size of the / and judging from this question it looks like it is possible...
https://askubuntu.com/questions/779609/lxd-container-disk-and-block-i-o-limits-edit-its-a-zfs-pool-limit
I tried doing this and It does write to the config , but the configuration never takes.
lxc profile device set tuleapprofile root size 20GB
lxc launch -p tuleapprofile images:centos/6/amd64 tuleap
TULEAP PROFILE
lxc profile show tuleapprofile
config: {}
description: Default LXD profile
devices:
eth0:
name: eth0
nictype: bridged
parent: lxdbr0
type: nic
root:
path: /
pool: default
size: 20GB
type: disk
name: tuleapprofile
used_by: []
df -h
8.9G 188M 8.8G 3% /
none 492K 0 492K 0% /dev
udev 3.9G 0 3.9G 0% /dev/full
udev 3.9G 0 3.9G 0% /dev/null
udev 3.9G 0 3.9G 0% /dev/random
udev 3.9G 0 3.9G 0% /dev/tty
udev 3.9G 0 3.9G 0% /dev/urandom
udev 3.9G 0 3.9G 0% /dev/zero
udev 3.9G 0 3.9G 0% /dev/fuse
udev 3.9G 0 3.9G 0% /dev/net/tun
tmpfs 100K 0 100K 0% /dev/lxd
tmpfs 100K 0 100K 0% /dev/.lxd-mounts
tmpfs 3.9G 0 3.9G 0% /dev/shm
All I want is to have / in the LXC containers be larger (by 20 G ) so I can install what I need. how can I do this. The method doesn't really matter , but I would like to have this.
Thanks

GitLab Click to deploy boot disk size

On the Gitlab Click2Deploy in Google Compute engine, there is a Boot Disk Size field that defaults to 100gb.
However df -h reveals that the boot disk is partitioned to 10gb.
Is this normal, or a bug?
[lol#gitlab-ydzp ~]$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 10G 2.4G 7.7G 24% /
devtmpfs 1.9G 0 1.9G 0% /dev
tmpfs 1.9G 0 1.9G 0% /dev/shm
tmpfs 1.9G 8.2M 1.8G 1% /run
tmpfs 1.9G 0 1.9G 0% /sys/fs/cgroup
The image used to create the boot disk has a partition size of 10G. There is another 90G available in your disk as unpartitioned space. Please follow the steps described in the link below to repartition your disk: Repartitioning a root persistent disk

Solaris /proc high physical memory usgae

I'm using Solaris (Solaris 10 5/08 s10x_u5wos_10 X86) to run a jboss application.
root#dev3-be3:/proc/17197$ ps -ef | grep java
root 24685 24670 2 12:13:46 pts/10 225:54 java -Dprogram.name=run_with_profiler.sh -server -Xdebug -Xnoagent -Xrunjdwp:tr
root#dev3-be3:/proc/24685$ du -sh * | grep G
1.0G as
18G fd
root#dev3-be3:/proc/24685$
root#dev3-be3:/proc/24685$ prstat | grep 24685
24685 root 1041M 991M cpu0 0 0 4:01:35 51% java/200
root#dev3-be3:/proc/24685$ df -k
Filesystem kbytes used avail capacity Mounted on
/ 124960305 110368903 13341799 90% /
/dev 124960305 110368903 13341799 90% /dev
/export/home 124960305 110368903 13341799 90% /export/home
/lib 124960305 110368903 13341799 90% /lib
/opt 124960305 110368903 13341799 90% /opt
/platform 124960305 110368903 13341799 90% /platform
/sbin 124960305 110368903 13341799 90% /sbin
/usr 124960305 110368903 13341799 90% /usr
/usr/local 124960305 110368903 13341799 90% /usr/local
proc 0 0 0 0% /proc
ctfs 0 0 0 0% /system/contract
mnttab 0 0 0 0% /etc/mnttab
objfs 0 0 0 0% /system/object
swap 6115848 272 6115576 1% /etc/svc/volatile
/usr/lib/libc/libc_hwcap1.so.1
124960305 110368903 13341799 90% /lib/libc.so.1
fd 0 0 0 0% /dev/fd
swap 6132272 16696 6115576 1% /tmp
swap 6115588 12 6115576 1% /var/run
192.168.150.32:/sftp 461928730 38771266 423157464 9% /sftp
root#dev3-be3:/proc/24685$
Why this /proc/pid/fd has high physical memory? This gets cleared after shutting down server.
Use ps or prstat to figure out how much memory a process is using. Using du on /proc pseudo file system is at best dubious.
Running 'du' on /proc (which is a virtual filesystem) is nonsensical.
There is a very good description of /proc found in its manpage, proc(4).
If your real question is "why is my java application using so much memory?"
then you are better off check the manpages to see what effect the profiler
has on memory usage. You should also check what version of java you're using
(memory usage has improved greatly in later releases). It's probably worthwhile
looking into the heap, too (see pmap).
Then you should ask your developers what they're doing and whether it's all
necessary.