GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   How to manage a vps (https://gfy.com/showthread.php?t=1270315)

King Mark 08-26-2017 03:34 PM

You doing too much bro

topadult 08-26-2017 05:27 PM

I suggest you use https://runcloud.io/ ;)

porn-update 08-28-2017 03:08 PM

Quote:

Originally Posted by Dead Eye (Post 21972133)
You doing too much bro

What you mean?

magneto664 08-28-2017 03:56 PM

Quote:

Originally Posted by porn-update (Post 21972083)
How should I read this?
[IMG]

It is strange this graph, free is very small, but also used is very small, cached is a lot,

and what is wrong with this? cache is a cache don't look on it.

porn-update 08-28-2017 04:56 PM

Ok, but for now I have moved only 2 of my sites, on this server I would like to put about 6 other sites very similar, as structure and visits, can I continue to add sites?

Barry-xlovecam 08-28-2017 08:44 PM

memory usage
$ free -m

I have 12G RAM on this box
Code:

barry@paragon-DS-7:~$ free -m
              total        used        free      shared  buff/cache  available
Mem:          12015        3467        4422        161        4124        8020
Swap:          4093          0        4093

That takes a few milliseconds to run in ssh

Or. you can run this -- repeats the command every 15 seconds and dates and logs the results.

Code:

$ while sleep 15; do  date >>my.log;  free -m >> my.log; done
Code:

$ cat my.log
will print the data to your screen.

or learn how to use the top command and sort your processes.

in ssh/terminal

Code:

$ man top
'q' to exit the manual [quits]

In the host's dashboard there are usage graphs.

magneto664 08-29-2017 08:16 AM

Quote:

Originally Posted by Barry-xlovecam (Post 21975701)
memory usage
$ free -m

I have 12G RAM on this box

It hosts pages that have more viewers than yours on vps with 1 gb of ram
I see that you like to give away money, will you give me a little?
tnx

Barry-xlovecam 08-29-2017 05:10 PM

That's just one LINUX box on my office desk -- that is running Xorg ltdm GUI. It's a single processor 4core workstation -- not a server.

magneto664 08-29-2017 06:35 PM

Quote:

Originally Posted by Barry-xlovecam (Post 21977149)
It's a single processor 4core workstation -- not a server.

So sorry but what you think? Server don't have a processors? or have a maybe different magic processors? this is same computer like any other.

OMG !!!

Barry-xlovecam 08-29-2017 08:58 PM

fuck you

magneto664 08-30-2017 03:06 AM

Quote:

Originally Posted by Barry-xlovecam (Post 21977367)
fuck you

Buahhahahaha !!!

Barry-xlovecam 08-30-2017 09:57 AM

Please-- put me on ignore -- asswipe

porn-update 08-30-2017 04:10 PM

Is it possible to block or throw out Magneto664 from the discussion?

It's a nice discussion, I'm very sorry that the focus on the main topic is lost because of an idiot

Barry-xlovecam 08-30-2017 06:12 PM

Don't worry about it ...
GFY is full of little attention whores.
That is what the main forum is for to hand someone their ass in a hat.

magneto664 08-30-2017 06:50 PM

Quote:

Originally Posted by porn-update (Post 21978973)
Is it possible to block or throw out Magneto664 from the discussion?

No worry i already ignore two knobs with ZERO idea about server, hosting and computer skills
pray to Jesus or whatever you do. I hope nobody will hack your amazing servers - you give almost everything in plain text

wait....... sorty I hope somebody hack your servers. you give almost everything in plain text :

bye.. and sweet kisses

porn-update 09-05-2017 05:45 PM

Umh...

Today's day of Cronjob... I make a cronjob for each site, at a distance of one hour from the other once a week.

Cronjob upload new content to MySQL, add new links to Sitemaps etc. Some cronjob last a few seconds 5-10-20 others are sometimes longer 2-3 min.

Today I began to see strange behaviors.
For example trying to install zip

Code:

root@ubuntu-2gb-blr1-14-04-3:~# sudo apt-get install zip
Reading package lists... Done
Building dependency tree     
Reading state information... Done
The following packages will be upgraded:
  zip
1 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
1 not fully installed or removed.
Need to get 0 B/262 kB of archives.
After this operation, 603 kB of additional disk space will be used.
(Reading database ... 64067 files and directories currently installed.)
Preparing to unpack .../archives/zip_3.0-8_amd64.deb ...
Unpacking zip (3.0-8) over (3.0-8) ...
dpkg: error processing archive /var/cache/apt/archives/zip_3.0-8_amd64.deb (--unpack):
 unable to create `/usr/bin/zip.dpkg-new' (while processing `./usr/bin/zip'): No space left on device
No apport report written because the error message indicates a disk full error
                                                                              dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/zip_3.0-8_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)


or occasionally visiting a site

http://porn-update.com/temp/Schermat...2002-26-28.png

Updating the page all back to work

Even nixstat from a few days, it's kinda hard to show me the charts.

I have added some site in the past few days, even from 2-3000 visits a day and are not all yet... the two most performing sites I would like to put on this server I have not moved them yet.

Are problems that can be solved with some optimization of MySQL (eg resizing tmp or caches) or is it already time to buy a larger server?

Barry-xlovecam 09-05-2017 06:22 PM

There is a problem writing to the disk.

$ df
and check the disc usage.

here is an example of a new vps

Code:

root@ds12-ams-2gb:~# df
Filesystem    1K-blocks    Used Available Use% Mounted on
udev            1014796      0  1014796  0% /dev
tmpfs            204820  16044    188776  8% /run
/dev/vda1      40593708 3052664  37524660  8% /
tmpfs            1024092      0  1024092  0% /dev/shm
tmpfs              5120      0      5120  0% /run/lock
tmpfs            1024092      0  1024092  0% /sys/fs/cgroup
tmpfs            204820      0    204820  0% /run/user/1001
tmpfs            204820      0    204820  0% /run/user/0

Have you been caching images and used up your disc allocation? If no you have some permission error but apt runs as root ...

porn-update 09-05-2017 06:53 PM

When login
Code:

  System information as of Wed Sep  6 01:25:04 UTC 2017

  System load:  0.75              Processes:          116
  Usage of /:  36.5% of 39.34GB  Users logged in:    0
  Memory usage: 21%                IP address for eth0: 139.59.71.64
  Swap usage:  0%

Code:

root@ubuntu-2gb-blr1-14-04-3:~# df
Filesystem    1K-blocks    Used Available Use% Mounted on
udev            1019956      12  1019944  1% /dev
tmpfs            204988      376    204612  1% /run
/dev/vda1      41251136 15058276  24484420  39% /
none                  4        0        4  0% /sys/fs/cgroup
none                5120        0      5120  0% /run/lock
none            1024936        0  1024936  0% /run/shm
none              102400        0    102400  0% /run/user
root@ubuntu-2gb-blr1-14-04-3:~#

My sites have practically only external images.

I have however MySQL tables with hundreds of thousands of lines.

I also use this type of query for the research:

Code:

$query_photo = "SELECT SQL_CALC_FOUND_ROWS ".$select_fields.", MATCH(title, description) AGAINST('".trim(addslashes($_GET['query']))."') as score FROM ".$prefix."photo WHERE MATCH(title, description) AGAINST('".trim(addslashes($_GET['query']))."') ".$sort_by." DESC LIMIT ".$start.", ".$step."";
Everyone says better search, more precise, etc. etc., but this type of query forces you to create indexes in databases with hundreds of thousands of rows... maybe they can cause excessive consumption of MySQL, CPU, disk, etc?

I also use APCU, memcached and Opcache, can they create the problem?

I did zip even with sudo, same result
Code:

root@ubuntu-2gb-blr1-14-04-3:~# sudo apt-get install zip
Reading package lists... Done
Building dependency tree     
Reading state information... Done
The following packages will be upgraded:
  zip
1 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
1 not fully installed or removed.
Need to get 0 B/262 kB of archives.
After this operation, 603 kB of additional disk space will be used.
(Reading database ... 64067 files and directories currently installed.)
Preparing to unpack .../archives/zip_3.0-8_amd64.deb ...
Unpacking zip (3.0-8) over (3.0-8) ...
dpkg: error processing archive /var/cache/apt/archives/zip_3.0-8_amd64.deb (--unpack):
 unable to create `/usr/bin/zip.dpkg-new' (while processing `./usr/bin/zip'): No space left on device
No apport report written because the error message indicates a disk full error
                                                                              dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/zip_3.0-8_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@ubuntu-2gb-blr1-14-04-3:~#

Today is the first day that I see these errors, until yesterday the sites worked properly and the server has always installed without problems

porn-update 09-06-2017 05:35 PM

Today also came this:

Code:

An unexpected error occurred:
IOError: [Errno 28] No space left on device: '/var/log/letsencrypt/letsencrypt.log'
Please see the logfile '/tmp/tmp58sSmQ' for more details.

But I have no clear of what space we are talking about... The disc is used at 38%, can not use the free space in some way???

It is RAM?

porn-update 09-06-2017 07:18 PM

I also found this

Code:

root@ubuntu-2gb-blr1-14-04-3:~#  sudo df -i
Filesystem      Inodes  IUsed  IFree IUse% Mounted on
udev            254989    392 254597    1% /dev
tmpfs          256234    316 255918    1% /run
/dev/vda1      2621440 2621440      0  100% /
none            256234      2 256232    1% /sys/fs/cgroup
none            256234      5 256229    1% /run/lock
none            256234      1 256233    1% /run/shm
none            256234      2 256232    1% /run/user
root@ubuntu-2gb-blr1-14-04-3:~#

Here I have a 100%, but I do not know what it is... or what to do...

porn-update 09-06-2017 08:38 PM

And this

Code:

root@ubuntu-2gb-blr1-14-04-3:~# sudo mkdir /var/mysqltmp
mkdir: cannot create directory ?/var/mysqltmp?: No space left on device

How is it possible that sites that in 5 years have reached 12 GB now fill 40gb in a few days???

What are you eating all this space?

porn-update 09-06-2017 10:16 PM

Maybe now it works...:banana

A lighting crossed my mind while I was pooping...

And I remembered having activated it in its time: Standard HTTP Caching
https://www.digitalocean.com/communi...n-ubuntu-14-04

In which I remembered that there were some lines, like these:
CacheLockPath /tmp/mod_cache-lock
CacheEnable disk

I had added them to the virtual host file in the first site, just to try, and when I added the new domains (copying the config file) I copied them to all new sites...

I removed them from the .conf files and for the moment everything seems to be back to work.

I restarted the server, but I probably have not freed all the space used by these caches, I have to understand how to do it... and disable them permanently...

Check in the next few days to see if everything works...

porn-update 09-07-2017 05:52 PM

What does updatedb.mlocat?

It is kinda that I observe this graph on digitalocean the second service that sucks resources is always updatedb.mlocat.

http://porn-update.com/temp/Schermat...2002-46-18.png

I searched a bit in Google, I found many guides on how to disable it, or remove it, or delete it from the cronjob.

But after many searches I have not yet figured out what it does and if it is a necessary service...

Someone can tell me what it is and what it does?

And if it can be disabled?

Strange thing, I see it only on Digitalocean, Nixstat does not show it

http://porn-update.com/temp/Schermat...2002-53-32.png

Barry-xlovecam 09-07-2017 10:54 PM

Locate is a system tool used like find
update db.mlocat is its database used

Code:

barry@paragon-DS-7:/$ locate apache|grep error
/etc/apache2/conf-available/localized-error-pages.conf
/etc/apache2/conf-enabled/localized-error-pages.conf
/home/barry/server-host-configuration/domains/apache-sites/sites-available/apache-error-module
/usr/share/apache2/error
/usr/share/apache2/error/HTTP_BAD_GATEWAY.html.var
/usr/share/apache2/error/HTTP_BAD_REQUEST.html.var
/usr/share/apache2/error/HTTP_FORBIDDEN.html.var
/usr/share/apache2/error/HTTP_GONE.html.var
/usr/share/apache2/error/HTTP_INTERNAL_SERVER_ERROR.html.var
/usr/share/apache2/error/HTTP_LENGTH_REQUIRED.html.var
/usr/share/apache2/error/HTTP_METHOD_NOT_ALLOWED.html.var
/usr/share/apache2/error/HTTP_NOT_FOUND.html.var
/usr/share/apache2/error/HTTP_NOT_IMPLEMENTED.html.var
/usr/share/apache2/error/HTTP_PRECONDITION_FAILED.html.var
/usr/share/apache2/error/HTTP_REQUEST_ENTITY_TOO_LARGE.html.var
/usr/share/apache2/error/HTTP_REQUEST_TIME_OUT.html.var
/usr/share/apache2/error/HTTP_REQUEST_URI_TOO_LARGE.html.var
/usr/share/apache2/error/HTTP_SERVICE_UNAVAILABLE.html.var
/usr/share/apache2/error/HTTP_UNAUTHORIZED.html.var
/usr/share/apache2/error/HTTP_UNSUPPORTED_MEDIA_TYPE.html.var
/usr/share/apache2/error/HTTP_VARIANT_ALSO_VARIES.html.var
/usr/share/apache2/error/README
/usr/share/apache2/error/contact.html.var
/usr/share/apache2/error/include
/usr/share/apache2/error/include/bottom.html
/usr/share/apache2/error/include/spacer.html
/usr/share/apache2/error/include/top.html
/var/lib/apache2/conf/enabled_by_maint/localized-error-pages
/var/log/apache2/error.log
/var/log/apache2/error.log.1
/var/log/apache2/error.log.10.gz
/var/log/apache2/error.log.11.gz
/var/log/apache2/error.log.12.gz
/var/log/apache2/error.log.13.gz
/var/log/apache2/error.log.14.gz
/var/log/apache2/error.log.2.gz
/var/log/apache2/error.log.3.gz
/var/log/apache2/error.log.4.gz
/var/log/apache2/error.log.5.gz
/var/log/apache2/error.log.6.gz
/var/log/apache2/error.log.7.gz
/var/log/apache2/error.log.8.gz
/var/log/apache2/error.log.9.gz

Code:

barry@paragon-DS-7:/$ apt search mlocat
Sorting... Done
Full Text Search... Done

mlocate/xenial,now 0.26-1ubuntu2 amd64 [installed,automatic]
  quickly find files on the filesystem based on their name

Use apt search to get information on installed processes, dameons or programs installed in Debian/Ubuntu LINUX

sudo apt autoremove mlocate
sudo apt purge mlocate
if you really want to remove mlocate.

Code:

barry@paragon-DS-7:/$ locate mlocat
/etc/cron.daily/mlocate
/usr/bin/mlocate
/usr/bin/updatedb.mlocate
/usr/share/doc/mlocate
/usr/share/doc/mlocate/AUTHORS
/usr/share/doc/mlocate/NEWS.gz
/usr/share/doc/mlocate/README
/usr/share/doc/mlocate/TODO.Debian
/usr/share/doc/mlocate/changelog.Debian.gz
/usr/share/doc/mlocate/copyright
/usr/share/locale-langpack/en_AU/LC_MESSAGES/mlocate.mo
/usr/share/locale-langpack/en_GB/LC_MESSAGES/mlocate.mo
/usr/share/man/man1/mlocate.1.gz
/usr/share/man/man5/mlocate.db.5.gz
/var/lib/mlocate
/var/lib/dpkg/info/mlocate.conffiles
/var/lib/dpkg/info/mlocate.list
/var/lib/dpkg/info/mlocate.md5sums
/var/lib/dpkg/info/mlocate.postinst
/var/lib/dpkg/info/mlocate.postrm
/var/lib/dpkg/info/mlocate.prerm
/var/lib/mlocate/mlocate.db
/var/lib/mlocate/mlocate.db.CBhsCO
barry@paragon-DS-7:/$

When the Mongols lead by the Great Khan invaded civilization they destroyed the farming infrastructure without regard to importance to the peasants survival because as nomads they did not understand what it was.

cat /usr/share/doc/mlocate/README
About
=====
mlocate is a locate/updatedb implementation. The 'm' stands for "merging":
updatedb reuses the existing database to avoid rereading most of the file
system, which makes updatedb faster and does not trash the system caches as
much.

The locate(1) utility is intended to be completely compatible to slocate. It
also attempts to be compatible to GNU locate, when it does not conflict with
slocate compatibility.

New releases will be available at https://fedorahosted.org/mlocate/ .

Installation
============
Before installation it is necessary to create a group called "mlocate" to allow
hiding the contents of the database from users.

When updatedb is run by root, the database contains names of files of all
users, but only members of the "mlocate" group may access it. "locate" is
installed set-GID "mlocate", no other program should need to run with this GID.

Portability
===========
mlocate should be portable to all SUSv3-compliant UNIXes, although it is
currently tested only on recent Linux distributions.

Bugs
====
Please consider reporting the bug to your distribution's bug tracking system.

porn-update 09-08-2017 03:52 PM

So maybe for now I keep it... anyway CPUs we still have...

The very serious problem that I thought I had solved and instead I still is the space...

I know that all my sites together (on cpanel other server) weigh about 10-12 Gb and in this new server I have not yet transferred the two heavier.

Today trying to decompress a file of about 300Mb I received the message out of space.

And I can't even figure out if it's true that space is exhausted...

When login:

Code:

  System load:  0.31              Processes:          105
  Usage of /:  37.1% of 39.34GB  Users logged in:    0
  Memory usage: 8%                IP address for eth0: 139.59.71.64
  Swap usage:  0%

Digitalocean monitor

https://i.imgur.com/0hLq0Kj.png

Nixstats monitor

https://i.imgur.com/WHwOgRw.png
https://i.imgur.com/dYsjQ3d.png

Code:

root@ubuntu-2gb-blr1-14-04-3:~# df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            997M  12K  997M  1% /dev
tmpfs          201M  364K  200M  1% /run
/dev/vda1        40G  15G  24G  39% /
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

Code:

root@ubuntu-2gb-blr1-14-04-3:~# du -max / | sort -rn | head -20
15108        /
13885        /var
10806        /var/cache
10655        /var/cache/apache2/mod_cache_disk
10655        /var/cache/apache2
1216        /var/log
988        /var/www/html
988        /var/www
921        /usr
882        /var/log/apache2
874        /var/lib
499        /var/lib/mysql
445        /var/log/apache2/access.log
372        /var/log/apache2/access.log.1
353        /usr/lib
296        /var/www/html/cdn.zip
263        /usr/share
242        /var/www/html/bigboobsupdate.com
218        /var/lib/mlocate/mlocate.db
218        /var/lib/mlocate

Code:

root@ubuntu-2gb-blr1-14-04-3:~# sudo du -sxm /var/* | sort -nr | head -n 15
10819        /var/cache
1209        /var/log
1021        /var/www
873        /var/lib
2        /var/backups
1        /var/tmp
1        /var/spool
1        /var/opt
1        /var/mail
1        /var/local
1        /var/crash
0        /var/run
0        /var/lock

root@ubuntu-2gb-blr1-14-04-3:~# sudo du -sxm /var/cache/* | sort -nr | head -n 15
10668        /var/cache/apache2
89        /var/cache/apt-xapian-index
56        /var/cache/apt
6        /var/cache/debconf
2        /var/cache/man
1        /var/cache/pppconfig
1        /var/cache/pollinate
1        /var/cache/ldconfig
1        /var/cache/dbconfig-common
1        /var/cache/apparmor

I just can't understand what is eating all this space, and I can't do anything until I solve this problem, not even to transfer the last 2 sites.

I no longer have the problem of the other day when the sites showed only errors, now seem to remain online, but the space on the server is always exhausted...

Barry-xlovecam 09-08-2017 08:13 PM

root@ds12-ams-2gb:/home# du -sh
or were your web root is

/var/www ?

du -h

will be more verbose

check the webroot are you caching any content?

porn-update 09-08-2017 09:25 PM

Code:

root@ubuntu-2gb-blr1-14-04-3:/var/www/html# du -sh
988M        .
root@ubuntu-2gb-blr1-14-04-3:/var/www/html# du -h
612K        ./tranny-hardpics.com/images
24K        ./tranny-hardpics.com/admin
93M        ./tranny-hardpics.com
1.7M        ./pornstarvideoupdates.com/images
28K        ./pornstarvideoupdates.com/admin
110M        ./pornstarvideoupdates.com
8.0K        ./function_global/poptm
36K        ./function_global/chaturbate_banner_rss
12K        ./function_global/bongacash_banner
12K        ./function_global/traffic_company_banner/mio iframe
32K        ./function_global/traffic_company_banner
68K        ./function_global/page_banner
12K        ./function_global/hilltopads code.txt
8.0K        ./function_global/pdo
12K        ./function_global/popads_adblock
16K        ./function_global/popads
8.0K        ./function_global/mobile_detect/export
8.0K        ./function_global/mobile_detect/namespaced/Detection
12K        ./function_global/mobile_detect/namespaced
288K        ./function_global/mobile_detect/tests/providers/vendors
292K        ./function_global/mobile_detect/tests/providers
776K        ./function_global/mobile_detect/tests
24K        ./function_global/mobile_detect/examples
1.2M        ./function_global/mobile_detect
160K        ./function_global/juicyads_banner
12K        ./function_global/clickadu
1.9M        ./function_global
684K        ./alternativegirlshardpics.com/images
20K        ./alternativegirlshardpics.com/admin
28M        ./alternativegirlshardpics.com
656K        ./tranny-search.com/images
20K        ./tranny-search.com/admin
80M        ./tranny-search.com
4.0K        ./cdn
676K        ./veryhardpics.com/images
24K        ./veryhardpics.com/admin
79M        ./veryhardpics.com
636K        ./tranny-beauty.com/images
24K        ./tranny-beauty.com/admin
63M        ./tranny-beauty.com
1.6M        ./bigboobsupdate.com/images
28K        ./bigboobsupdate.com/admin
4.0K        ./bigboobsupdate.com/cgi-bin
242M        ./bigboobsupdate.com
988M        .

http://i66.tinypic.com/j6u1l5.png

That I know, the only cache systems currently installed are APCU, memcached, Opcache

CDN is the only folder with about 15000 photos, but it is the one that I can not extract because it is finished space

Barry-xlovecam 09-10-2017 02:00 AM

(15000*100K)*1000
1,500,000,000

/CDN is 1.5 GB maybe

why are there no users shown? /home/user
what is 'finished space' supposed to mean?
root should be able to access all locations.

porn-update 09-11-2017 07:26 AM

http://porn-update.com/temp/Schermat...2016-07-43.png

No, CDN is still empty, I managed to load the zip, but when I try to extract, it extracts some photos and then "Space finished".

Also extracted, CDN weighs about 309 Mb

http://porn-update.com/temp/Schermat...2016-09-40.png

The strange thing is also that some counters see exhausted space, other half empty...

Maybe some counters don't see the data in some caches?

I'm still thinking about those damned "Standard HTTP caching", which saved here /var/cache/apache2/mod_cache_disk, and actually in this folder there is still something...

http://porn-update.com/temp/Schermat...2016-17-29.png

http://porn-update.com/temp/Schermat...2016-30-08.png

I would try to empty it/delete it, but can I do it with an "rm", or will it destroy the server?

porn-update 09-11-2017 07:39 AM

Umh...I did this

Code:

root@ubuntu-2gb-blr1-14-04-3:/var/cache/apache2/mod_cache_disk# du -sh
11G        .

But I also found this

File: /etc/default/apache2
Code:

### htcacheclean settings ###

## run htcacheclean: yes, no, auto
## auto means run if /etc/apache2/mods-enabled/cache_disk.load exists
## default: auto
HTCACHECLEAN_RUN=auto

## run mode: cron, daemon
## run in daemon mode or as daily cron job
## default: daemon
HTCACHECLEAN_MODE=daemon

## cache size
HTCACHECLEAN_SIZE=300M

## interval: if in daemon mode, clean cache every x minutes
HTCACHECLEAN_DAEMON_INTERVAL=120

## path to cache
## must be the same as in CacheRoot directive
HTCACHECLEAN_PATH=/var/cache/apache2/mod_cache_disk

## additional options:
## -n : be nice
## -t : remove empty directories
HTCACHECLEAN_OPTIONS="-n"

It seems that it should be limited and eliminated regularly...

But something seems not to have worked properly...

porn-update 09-11-2017 08:27 AM

I launched this:
Code:

root@ubuntu-2gb-blr1-14-04-3:~# htcacheclean -p/var/cache/apache2/mod_cache_disk -l 1
Ubuntu Manpage: htcacheclean - Clean up the disk cache

Something he did
Code:

  System load: 0.0                Memory usage: 3%  Processes:      70
  Usage of /:  32.0% of 39.34GB  Swap usage:  0%  Users logged in: 0

Although I expected more by removing 11 Gb...

porn-update 09-14-2017 08:47 AM

http://porn-update.com/temp/Schermat...2017-44-31.png

Much better than before, but the time still seems a little high...

Will it improve over time? Can I improve it in some way?

Barry-xlovecam 09-14-2017 01:27 PM

If you are using Varnish you are caching pages -- and taking up space -- see if you can purge the pages little used on a daily basis?

If you request images from other servers you may have slow page load times depending on the number of images requested, the geolocation and peering to your server(s) and the current load on the server you are requesting images from.

Fewer images per page might help. Using jQuery lazy load in your HTML might help also. The initial load time should stat out better.

porn-update 09-15-2017 08:55 AM

Varnish I installed it, but it practically never worked, on Digitalocean Varnish and Apache quarrel for the port 80 due to some symbolic link. The thing was resolved on 16.04, but a little abandoned to itself on the one of 14.04.
Currently it seems that or start Apache or start varnish, together do not want to work

Unfortunately almost all images of my sites are on the sites of content producer, on which I have no control.
I tried long ago to create the thumbnails and host them on my server (in the CDN folder) using CloudFlare for cache and CDN, but I lost about 80% of the visits...
Is still more or less active here: Big Boobs Hard Pics | Big Boobs, Huge Boobs, Huge Tits, Busty,, but I have not recovered all the visits.

For some time I have installed a lazyload http://www.lezdomhardtube.com/lazysizes.min.js, but not that of jquery, because only the jquery framework weighs practically more than the code of my sites.
Of this lazyload I am not very convinced, because it does not load all the photos of the page, but it loads more than those visible in the window... seems to do his job, but a little too much... and I have not noticed significant changes between first and after the implementation of this Lazyload...
As soon as I have free time I try another, just to try.

Always thanks for the answers

porn-update 09-15-2017 10:26 AM

I'm trying to focus on the headers for speed up.

Because for example I have enabled mod_deflate, but I do not understand if it is compressing and what is compressing...

I have all its nice rules in the htaccess files of each site, but I have no idea what it is, or where it is, the configuration of my server.

Code:

<IfModule mod_deflate.c>
      <IfModule mod_setenvif.c>
            BrowserMatch ^Mozilla/4 gzip-only-text/html
            BrowserMatch ^Mozilla/4\.0[678] no-gzip
            BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
            BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
      </IfModule>
      <IfModule mod_headers.c>
            Header append Vary User-Agent env=!dont-vary
      </IfModule>
AddOutputFilterByType DEFLATE text/css application/x-javascript text/html text/richtext image/svg+xml text/plain text/xsd text/xsl text/xml image/x-icon
</IfModule>

In cpanel There is the option "compress all" and you have no way to do anything else.
With the server however I saw that there are configurations on the level of compression, but I can not even find the configuration files, in the sense that I find the files, but inside there is nothing of everything that is spoken on the guides...



Another thing for example I would like to add CharSet: UTF-8 to the Content-type header

I have seen guides where they say they are in the httpd. conf file that I do not find or in the Apache configuration files, and in mine there is nothing about it...

I'm not understanding anything...

This is the current configuration of the headers of my sites, definitely missing something, but I can not figure out how to add or edit.. (except via httaccess)

http://porn-update.com/temp/Schermat...2018-38-14.png

What and how can I configure server headers globally, without using individual htaccess?

porn-update 09-18-2017 10:06 AM

So... in a couple of days I realized something... but I realized that practically there is nothing to understand...

Deflate already seems to do everything alone and work very well as it is...

And even less touches better is...

I have however found that some tools like Pagespeed, Gtmetrix, varvy, say that compression is not enabled because of these 2 files:
search.js
lazysizes.min.js

I added to /etc/apache2/mods-enabled/deflate.conf "text/javascript" (idea found searching) and search.js seems to have resolved, but continue to tell me that compression is not enabled for lazysizes.min.js, perhaps because of the "min", which maybe does recognize the extension.

I could make a change in my sites and remove the min from the filename, but it would take a long time, and surely sooner or later the thing would repeat in the future.

Is there a way to fix it permanently via server, the failure to compress .js and .min.js files?


P.S.
For the Charset Utf-8 I realized that it is in this file:/etc/apache2/conf-available/charset.conf
And just enable this: AddDefaultCharset UTF-8

P.P.S.
Considering that almost all images of my sites come from external resources, can it be a good idea to enable compression even for images via deflate?
Or would it completely kill my server's resources?
Does deflate also affect images from external resources?

P.P.P.S.
In Pagespeed I noticed for the first time Pagespeed module for Apache (I had never noticed before not having a server).
Can be a good or bad idea?
Usually I do not trust too much of BigG because he has a tendency to take much more than he gives, and I do not want to give free the resources of my server to him. He doesn't really need it.

Barry-xlovecam 09-18-2017 10:46 AM

It might be just easier to spend another $20/mo and expand the server's resources?

Quote:

Does deflate also affect images from external resources?
NO
that is a remote server you cannot control.

use

$ sed 's/\.min//g'
test it first
then sed -i.bk
-i [in place edit].bk [.bk backupfile]

I like to make a backup directory with copies in case I fuck-up
Code:

$ mkdir backedup; cp * backedup
you will need the file paths
Code:

$ find . -name "*.min.js"
or
Code:

$ find . -name "*.js" -o  -name "*.min.js"
find . is recursive so start in the right location near just above the files.

to find script references
is recursive so start in the right location near just above the files.
Code:

$ grep -rni '.js'
JavaScripts are generally cashed in browsers -- their requests are 304 usually after the first visit -- certainly per session. Exceptions being deleted user cache files and private/incognito sessions.

porn-update 09-18-2017 11:55 AM

But I know the file, is the famous lazyload (sorry if I have not written it before, I did not thinking about)

But I can not understand why it is not compressed by deflate

porn-update 09-20-2017 12:54 PM

I was thinking of installing Fail2ban, but I saw that it reads Apache errors.

So much to look at, I opened Apache errors
I noticed that my Apache logs are full of this:
Code:

[Mon SEP 18 06:39:16.678185 2017] [Core: ERROR] [PID 31667] [Client 180.76.15.6:29891] AH00124: Request exceeded the limit of 10 internal redirects due to probable configuration error. Use ' LimitInternalRecursion ' to increase the limit if necessary. Use ' LogLevel debug ' to get a backtrace.
[Mon SEP 18 06:39:18.149155 2017] [Core: ERROR] [PID 31837] [Client 180.76.15.23:55177] AH00124: Request exceeded the limit of 10 internal redirects due to probable configuration error. Use ' LimitInternalRecursion ' to increase the limit if necessary. Use ' LogLevel debug ' to get a backtrace.
[Mon SEP 18 06:39:18.653379 2017] [Core: ERROR] [PID 31984] [Client 180.76.15.141:41970] AH00124: Request exceeded the limit of 10 internal redirects due to probable configuration error. Use ' LimitInternalRecursion ' to increase the limit if necessary. Use ' LogLevel debug ' to get a backtrace.

The IP seems to be Baidu, which I block via htaccess in all my sites with:
Code:

RewriteCond %{HTTP_USER_AGENT} ^.*MJ12bot [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^.*Yandex [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^.*Baidu [NC]
RewriteRule .*  - [L,F]

(It is a rule that they have made me add various hosting and VPS services, to try to find resources to keep sites online. I don't even know if it's a good thing or not...)

I'm afraid that installing Fail2ban would read continually new errors and probably he will drink all the resources of my server...

(also the fact that each visit generates a log line I do not like so much)

Looking in G, it seems to be some url_rewriter problem.

Looking for logLevel debug I found this:
mod_rewrite - Apache HTTP Server Version 2.4

But I think I didn't understand something because:
Code:

root@ubuntu-2gb-blr1-14-04-3:~# tail -f error_log|fgrep '[rewrite:'
tail: cannot open ‘error_log’ for reading: No such file or directory
root@ubuntu-2gb-blr1-14-04-3:~# LogLevel alert rewrite:trace3
LogLevel: command not found


What am I missing? How should I use this?

Barry-xlovecam 09-20-2017 04:52 PM

Quote:

Originally Posted by porn-update (Post 22007745)
I was thinking of installing Fail2ban, but I saw that it reads Apache errors.....

But I think I didn't understand something because:
Code:

root@ubuntu-2gb-blr1-14-04-3:~# tail -f error_log|fgrep '[rewrite:'
tail: cannot open ‘error_log’ for reading: No such file or directory
root@ubuntu-2gb-blr1-14-04-3:~# LogLevel alert rewrite:trace3
LogLevel: command not found


What am I missing? How should I use this?

You need to find the location of the error log for that domain.

use find or locate or read the configuration file for that domain

Code:

$ cd /etc/apache2/sites-available
$ tac <domain file> |less

or from ~ of root


Code:

$ (cd /etc/apache2/sites-available &&  grep -i 'error\.log' <domain config file>
then when you have the location (path)

Code:

$ tac <path/to/file/error.log> |less
this will read the file starting from the last line. less is one screen at a time, space bar next page -- return next line, q is quit and close the command (tac) tac is cat backwards -- get it?

Code:

$ tac <path/to/file/error.log> egrep -i 'this|or|that' |less

$  man grep
#for more command options



All times are GMT -7. The time now is 02:51 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc