Re: apache2 changing from mpm_prefork to mpm_event

2018-08-16 Thread Jens Sauer
There is no workaround.

mpm_event and php as a mod are incompatible.
You can of course use php-fpm with mpm_event.


Jarosław Kłopotek - INTERDUO  schrieb am Do., 16. Aug.
2018, 08:56:

> I've got apache2 with mpm_prefork. I would like to change that to
> mpm_event so I do:
>
> root@ht2:~# a2dismod mpm_prefork
> ERROR: The following modules depend on mpm_prefork and need to be
> disabled first: php7.2
>
> That's ok I will disable this module also temporary.
>
> root@ht2:~# a2dismod php7.2 mpm_prefork
> Module php7.2 disabled.
> Module mpm_prefork disabled.
> To activate the new configuration, you need to run:
>systemctl restart apache2
>
> And then try to enable back:
>
> root@ht2:~# a2enmod mpm_event
> Considering conflict mpm_worker for mpm_event:
> Considering conflict mpm_prefork for mpm_event:
> Enabling module mpm_event.
> To activate the new configuration, you need to run:
>systemctl restart apache2
>
> root@ht2:~# a2enmod php7.2
> Considering dependency mpm_prefork for php7.2:
> Considering conflict mpm_event for mpm_prefork:
> ERROR: Module mpm_event is enabled - cannot proceed due to conflicts. It
> needs to be disabled first!
> Considering conflict mpm_worker for mpm_prefork:
> ERROR: Could not enable dependency mpm_prefork for php7.2, aborting
>
> This is something wrong. Apache2 should check if one of the installed
> mpm's is enabled not just only to check if mpm_prefork is enabled.
>
> Do You know any workaround?
>
> Regards
>
> --
> Jarosław Kłopotek
> kom. 607 893 111
> Interduo Ł. Bujek, J. Kłopotek, J. Sowa s.c.
> ul. Lubelska 36B/40, 21-100 Lubartów
> tel. 81 475 30 00
>
>


Re: fpm problem

2018-07-26 Thread Jens Sauer
Am Donnerstag, den 26.07.2018, 16:38 +0300 schrieb Gokan Atmaca:
> > Could it be that starting 4000 fpm processes eats up all your
> > resources
> > and starting the fpm-master process fails? Can you please check if
> > the
> > php7.2-fpm service is running?
> 
> Yes , services running...
> 
> > Can you try something like this?
> > 
> > pm = dynamic
> > pm.max_children = 250
> > pm.start_servers = 25
> > pm.min_spare_servers = 15
> > pm.max_spare_servers = 30
> 
> fpm, 8 mb per transaction. 32g ram... I have 32G RAM. I just want to
> use 24g ram.
> 
> 24576/8 = 3072 (pm.max.child)
> is this logic wrong?
> 

I think that php-fpm needs more than 8 MB RAM per process.
On my machine they currently around 50 MB per process.
And you do not have the guarantee that they will not need more
than this.

In your first mail the warning says that you are currently using 143
child processes. Why do you want to start 4000 at the beginning?

If you do not want to have a dynamic adjustment of the fpm processes,
this is what 'pm = dynamic' does, that you can try 'pm = static'.

> 
> S   UID   PID  PPID  C PRI  NI   RSSSZ WCHAN  TTY  TIME
> CMD
> S33  9343   594  0  80   0  5336 40706 SyS_ep ?00:00:00
> nginx
> S33  9344   594  0  80   0  5336 40706 SyS_ep ?00:00:00
> nginx
> S33  9345   594  0  80   0  5336 40706 SyS_ep ?00:00:00
> nginx
> S33  9347   594  0  80   0  5336 40706 SyS_ep ?00:00:00
> nginx
> S33  9348   594  0  80   0  5336 40706 SyS_ep ?00:00:00
> nginx
> S33  9349   594  0  80   0  5336 40706 SyS_ep ?00:00:00
> nginx
> S33  9346   594  0  80   0  6324 40706 SyS_ep ?00:00:00
> nginx
> S33  9342   594  0  80   0  7004 40772 SyS_ep ?00:00:00
> nginx
> S33  4828  4792  0  80   0  7400 87637 skb_wa ?00:00:00
> php-fpm7.2
> S33  4829  4792  0  80   0  7400 87637 skb_wa ?00:00:00
> php-fpm7.2
> S33  4830  4792  0  80   0  7400 87637 skb_wa ?00:00:00
> php-fpm7.2
> S33  4831  4792  0  80   0  7404 87637 skb_wa ?00:00:00
> php-fpm7.2
> S33  4832  4792  0  80   0  7404 87637 skb_wa ?00:00:00
> php-fpm7.2
> S33  4833  4792  0  80   0  7404 87637 skb_wa ?00:00:00
> php-fpm7.2
> S33  4834  4792  0  80   0  7404 87637 skb_wa ?00:00:00
> php-fpm7.2
> S33  4835  4792  0  80   0  7404 87637 skb_wa ?00:00:00
> php-fpm7.2
> S33  4836  4792  0  80   0  7404 87637 skb_wa ?00:00:00
> php-fpm7.2
> S33  4837  4792  0  80   0  7404 87637 skb_wa ?00:00:00
> php-fpm7.2
> S33  4838  4792  0  80   0  7404 87637 skb_wa ?00:00:00
> php-fpm7.2
> S33  4839  4792  0  80   0  7404 87637 skb_wa ?00:00:00
> php-fpm7.2
> S33  4840  4792  0  80   0  7404 87637 skb_wa ?00:00:00
> php-fpm7.2
> S33  4841  4792  0  80   0  7404 87637 skb_wa ?00:00:00
> php-fpm7.2
> S33  4842  4792  0  80   0  7404 87637 skb_wa ?00:00:00
> php-fpm7.2
> S33  4843  4792  0  80   0  7404 87637 skb_wa ?00:00:00
> php-fpm7.2
> S33  4844  4792  0  80   0  7404 87637 skb_wa ?00:00:00
> php-fpm7.2
> S33  4845  4792  0  80   0  7404 87637 skb_wa ?00:00:00
> php-fpm7.2
> S33  4846  4792  0  80   0  7404 87637 skb_wa ?00:00:00
> php-fpm7.2
> S33  4847  4792  0  80   0  7408 87637 skb_wa ?00:00:00
> php-fpm7.2
> S33  4848  4792  0  80   0  7408 87637 skb_wa ?00:00:00
> php-fpm7.2
> S33  4849  4792  0  80   0  7408 87637 skb_wa ?00:00:00
> php-fpm7.2
> S33  4850  4792  0  80   0  7408 87637 skb_wa ?00:00:00
> php-fpm7.2
> 
> 
> On Thu, Jul 26, 2018 at 4:00 PM, Jens Sauer 
> wrote:
> > Am Donnerstag, den 26.07.2018, 15:37 +0300 schrieb Gokan Atmaca:
> > > > Can you attach your PHP-FPM configuration file and NginX
> > > > virtual
> > > > host
> > > > section for the site?
> > > 
> > > Hello
> > > 
> > > Debian stable (strech).
> > > 
> > > packages:
> > >  php7.2-fpm
> > > 7.2.6-1+0~20180611145758.22+stretch~1.gbpe20e8b amd64
> > > server-side, HTML-embedded scripting language (FPM-CGI binary)
> > > nginx   1.10.3-1+deb9u1
> > >  all  small, powerful, scalable web/proxy
> > > server
> > > 
> > 
> > This php7.2-fpm package is definitely not from the stable
> > repository.
> > php7.2 is not available in stretch and the latest php7.0-fpm
> > versio

Re: fpm problem

2018-07-26 Thread Jens Sauer
Am Donnerstag, den 26.07.2018, 15:37 +0300 schrieb Gokan Atmaca:
> > Can you attach your PHP-FPM configuration file and NginX virtual
> > host
> > section for the site?
> 
> Hello
> 
> Debian stable (strech).
> 
> packages:
>  php7.2-fpm
> 7.2.6-1+0~20180611145758.22+stretch~1.gbpe20e8b amd64
> server-side, HTML-embedded scripting language (FPM-CGI binary)
> nginx   1.10.3-1+deb9u1
>  all  small, powerful, scalable web/proxy server
> 

This php7.2-fpm package is definitely not from the stable repository.
php7.2 is not available in stretch and the latest php7.0-fpm version
is 7.0.30-0+deb9u1

> Fpm config:
> 
> [www]
> user = www-data
> group = www-data
> listen = /run/php/php7.2-fpm.sock
> listen.owner = www-data
> listen.group = www-data
> pm = dynamic
> pm.max_children = 5000
> pm.start_servers = 4000
> pm.min_spare_servers = 4000
> pm.max_spare_servers = 5000

Could it be that starting 4000 fpm processes eats up all your resources
and starting the fpm-master process fails? Can you please check if the
php7.2-fpm service is running?

Can you try something like this?

pm = dynamic
pm.max_children = 250
pm.start_servers = 25
pm.min_spare_servers = 15
pm.max_spare_servers = 30

> -- Nginx config:
> 
> server {
> listen 80;
> 
> root /home/website/;
> index index.php index.html index.htm;
> client_max_body_size 256M;
> server_name y.br
> 
> 
> 
> location = /favicon.ico {
> log_not_found off;
> access_log off;
>    }
> 
> 
> if ($http_user_agent ~* LWP::Simple|wget|libwww-perl) {
>   return 403;
>  }
> 
> 
> location ~*
> \.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|ogg|ogv|webm|htc)$ {
>  expires 365d;
>  add_header Cache-Control "public";
>    }
> 
> 
> location ~* \.(?:css|js)$ {
>   expires 1y;
>   access_log off;
>   add_header Cache-Control "public";
> }
> 
> 
>  location / {
> try_files $uri $uri/ /index.php?q=$uri&$args;
> 
> 
> }
> 
> location /my{
>  allow x.x.x.x;
>  allow x.x.x.x;
>  if ($scheme = http) {  return 301 https://$host$request_uri;}
>  deny all;
>  error_page 403  error403.html;
>  try_files $uri $uri/ /index.php?q=$uri&$args;
> }
> 
>  location ~ \.php$ {
> try_files $uri =404;
> fastcgi_split_path_info ^(.+\.php)(/.+)$;
> fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
> fastcgi_index index.php;
> fastcgi_param SCRIPT_FILENAME $request_filename;
> include fastcgi_params;
> }
> 
> gzip on;
> gzip_disable "msie6";
> gzip_comp_level 9;
> gzip_min_length 1100;
> gzip_buffers 16 8k;
> gzip_proxied any;
> gzip_types
> text/plain
> text/css
> text/js
> text/xml
> text/javascript
> application/javascript
> application/x-javascript
> application/json
> application/xml
> application/xml+rss;
> 
> On Thu, Jul 26, 2018 at 2:56 PM, Georgi Naplatanov 
> wrote:
> > On 07/26/2018 12:45 PM, Gokan Atmaca wrote:
> > > > What happened after you did what the warning message suggested
> > > > to do?
> > > 
> > > 502 gateway timeout
> > 
> > Can you attach your PHP-FPM configuration file and NginX virtual
> > host
> > section for the site?
> > 
> > Which Debian branch are you using - stable, testing or unstable?
> > Where
> > did you get PHP 7.2 packages from ?
> > 
> > Kind regards
> > Georgi
> > 
> > > On Thu, Jul 26, 2018 at 11:50 AM, Markus Schönhaber
> > >  wrote:
> > > > Gokan Atmaca, Do 26 Jul 2018 08:46:46 CEST:
> > > > 
> > > > > we are receiving an error as below. what is the cause of the
> > > > > problem?
> > > > > (32g ram , 240g ssd , xeon 8 cor cpu)
> > > > > 
> > > > > WARNING: [pool www] seems busy (you may need to increase
> > > > > pm.start_servers, or pm.min/max_spare_servers), spawning 32
> > > > > children,
> > > > > there are 1 idle, and 143 total children
> > > > 
> > > > What happened after you did what the warning message suggested
> > > > to do?
> > > > 
> > > > --
> > > > Regards
> > > >   mk
> > > > 
> 
> 
-- 
Jens Sauer 

smime.p7s
Description: S/MIME cryptographic signature


Re: Debian 9.4 and Aspeed/AST2400

2018-06-16 Thread Jens Sauer
Am Freitag, den 15.06.2018, 16:31 -0700 schrieb  Ryan C:
> 
> Hello,
> 
> We are having trouble getting Linux to function properly on SuperMicro
> hardware (X10SRI-F + E5-2620v4) which uses the AST2400 for VGA output. We have
> tried several "desktop" distributions: Ubuntu, Fedora, Xubuntu, Lubuntu, and
> Debian. As well as several versions of Ubuntu. We noticed the issue first
> starts with Ubuntu 16.04.2 and is still present in 18.04. In 16.04.1 and below
> the video is working fine. Debian is also using a newer kernel which has
> problems with this aspeed chip.  
> 
> Our issue is that the video output is very very slow at updating. Even the TTY
> framebuffer console can be slow at rendering. We open a window or click a menu
> and we can see each line of the display being drawn very slowly. Similarly,
> the login screens respond very slowly to keyboard input and mouse lags and
> jumps around.
> 
> We have narrowed the issue down to specifically to Linux Kernel version 4.9
> and above. Running Kernel version 4.8 or lower has no video issues at all.
> 
> Is this a known issue? Is there a known fix? Maybe we need to roll back the
> BIOS?
> 
> There are two possible fixes we found, but they may just be covering up the
> issue rather than fixing it:
> 
> 1) set the cpu frequency in Linux to the maximum speed, with "performance"
> governor. This helps, but doesn't completely solve the slow video rendering
> and tearing. Also, it is not permanent. 
> 
> 2) Set the gpu/vga OPROM to "EFI" in the BIOS. This seems to fix the slow
> graphics issue on the desktop, but does not help with the slow rendering on
> the login screen.
> 
> From what we can tell, the "ast" video driver is being used. Moving the ast
> kernel module from one system do another doesn't do anything, but switching
> between 4.8 and 4.9 is where everything breaks. 
> 

Do you have the same issue in the KVM/HTML5 viewer over IPMI?

I use a X11SSM-F witch has also the AST2400. Currently I use the stretch-
backports kernel because the EDAC module of kaby lake cpu's is not supported in
4.9

With 4.15 I had some strange wrong color output during boot, the tty color
switched to red.
This issue was gone gone after the installation of intel-microcode from stretch-
backports.

Have a nice day,
-- 
Jens Sauer 

GPG Key: 5C0B0084
Fingerprint: 75F3 6232 1F69 82E8 F5E0 D151 850E 2908 5C0B 0084


signature.asc
Description: This is a digitally signed message part


Is the "fjes" Kernel Module loaded on every system?

2017-01-24 Thread Jens Sauer
Hey list,

During my custom kernel configuration using "make localmodconfig" I noticed that
the "fjes" driver was configured.
I wondered why this network driver was needed for my laptop, so I have done some
research.
According this [1] linux-netdev mailing list entry, which introduces the fjes
module, it is only needed for Extended Partitions of Fujitsu Primequest 2000
series servers.
This mail [2] refers to a Fujitsu document in which these special Extended
Partitions are explained.
I am sure that I don't need this driver for my ThinkPad T450s.
Nevertheless it is loaded because of an ACPI device "PNP0C02" which is linked to
the module [3].

TL;DR
Can someone confirm if this module is loaded on their hardware, even if you
don't have a Fujitsu Primequest 2000 series server?

[1]https://marc.info/?l=linux-netdev=142951966404542=2
[2]https://lwn.net/Articles/655298/
[3] https://cateee.net/lkddb/web-lkddb/FUJITSU_ES.html

Greetings
-- 
Jens Sauer <jsaue...@gmail.com>

GPG Key: 5C0B0084
Fingerprint: 75F3 6232 1F69 82E8 F5E0 D151 850E 2908 5C0B 0084

signature.asc
Description: This is a digitally signed message part


Re: mdadm - two questions

2016-11-22 Thread Jens Sauer
> Unfortunately I cannot see how from raid1 of 2*1TB disks migrate to
> raid1(raid10?)  of 4*1TB disks

I don't think you can reshape a RAID 1 to a RAID 10.

mdadm can reshape RAID 1/5/6. You can move from RAID 5 to 6 or the other
way around.
*Maybe* you can even reshape from 1 to RAID 5/6.

I see these options:

* create a second RAID 1 with the new devices, make this a pv and add it to
your vg
* backup all data, create a RAID 10/5/6 with all four devices
* Test if you can reshape from RAID 1 to 5/6

The last option only if RAID 5/6 serves your needs.

Regards,
Jens


Re: C source

2016-07-15 Thread Jens Sauer
I think you are missing dependencies from the ssl library. Have a look into
the docs [1].

Your questions implies that you are not very experienced in C coding.
Maybe you should ask yourself the question if starting with a complex and
potential security risky api like openssl is the right thing for a beginner.

Happy coding

[1] https://www.openssl.org/docs/manmaster/ssl/ssl.html

Am 15.07.2016 12:07 nachm. schrieb "Pol Hallen" :

sorry, my mistake about the package (I use debian testing)

  find /usr/include -name md5.h
>

find /usr/include/ -name md5.h
/usr/include/openssl/md5.h
/usr/include/crypto++/md5.h

  #include 
>

now I've many errors

thanks for help!

alice.c:50:18: error: unknown type name ‘md5_context’
 void md5_starts( md5_context *ctx )
  ^
alice.c:61:19: error: unknown type name ‘md5_context’
 void md5_process( md5_context *ctx, uint8 data[64] )
   ^
alice.c:61:37: error: unknown type name ‘uint8’
 void md5_process( md5_context *ctx, uint8 data[64] )
 ^
alice.c:184:18: error: unknown type name ‘md5_context’
 void md5_update( md5_context *ctx, uint8 *input, uint32 length )
  ^
alice.c:184:36: error: unknown type name ‘uint8’
 void md5_update( md5_context *ctx, uint8 *input, uint32 length )
^
alice.c:184:50: error: unknown type name ‘uint32’
 void md5_update( md5_context *ctx, uint8 *input, uint32 length )
  ^
alice.c:223:8: error: unknown type name ‘uint8’
 static uint8 md5_padding[64] =
^
alice.c:231:18: error: unknown type name ‘md5_context’
 void md5_finish( md5_context *ctx, uint8 digest[16] )
  ^
alice.c:231:36: error: unknown type name ‘uint8’
 void md5_finish( md5_context *ctx, uint8 digest[16] )
^
alice.c: In function ‘main’:
alice.c:299:3: error: unknown type name ‘md5_context’
   md5_context ctx;
   ^
alice.c:321:3: warning: implicit declaration of function ‘md5_starts’
[-Wimplicit-function-declaration]
   md5_starts(  );
   ^
alice.c:325:7: warning: implicit declaration of function ‘md5_update’
[-Wimplicit-function-declaration]
   md5_update( , buf, i );
   ^
alice.c:332:3: warning: implicit declaration of function ‘md5_finish’
[-Wimplicit-function-declaration]
   md5_finish( , md5sum );
   ^


Pol