0

I'm having memory (RAM) issues in my Digital Ocean droplet,

I have 3 sites with average of 300 unique visitors daily, with 2GB's of RAM and 2GB (in my opinion this should be enough) of swap...

I runned: php -m

And this is the result:

bcmath
bz2
calendar
Core
ctype
curl
date
dba
dom
ereg
exif
fileinfo
filter
ftp
gd
gettext
hash
iconv
json
libxml
mbstring
mhash
mysql
mysqli
openssl
pcntl
pcre
PDO
pdo_mysql
Phar
posix
readline
Reflection
session
shmop
SimpleXML
soap
sockets
SPL
standard
sysvmsg
sysvsem
sysvshm
tokenizer
wddx
xml
xmlreader
xmlwriter
Zend OPcache
zip
zlib

That know, the only one I'm using of those is curl, but most of them, I don't know what they do.

Which of these modules do you think most websites don't need?

PS: I use MySQL, sessions, I make several responses that return JSON, it's really the basic stuff.

Chopper3
  • 100,240
  • 9
  • 106
  • 238

1 Answers1

0

There is no way for us to know what it's safe for you to disable based on the information you have provided. In reality only you can safely determine this by testing.

  • Disable a module
  • Run tests
  • Make a decision
  • Rinse and repeat.

It's interesting that you have picked on PHP modules to try to reduce your memory footprint - I've never had to do that. Which is not top say yu're wrong, it's just less likely to be an issue than other things.

You should spend some time getting to know your system better using tools like top, sar, free, vmstat, iostat etc and by looking in your logs when your system is running normally and when you have problems. Use the tools to figure out what is using memory and when, how the system react to load etc. Then you can start to apply scientific method.

user9517
  • 114,104
  • 20
  • 206
  • 289
  • I made a small edit to the question, thanks for your input. I'll see if I can test like this ( disabling one by one... ) the thing is I don't have a preproduction server... – Toni Michel Caubet Dec 28 '15 at 09:37
  • Your edit makes no difference. – user9517 Dec 28 '15 at 09:38
  • A preproduction system is necessary, especially if you are hesitant to test in the primary system. What makes you think you have memory issues anyway, page outs ? – John Mahowald Dec 29 '15 at 17:54