GRPC Multiprocessing not working in Python - grpc

I'm trying grpc multiprocess example listed here on OSX -
https://github.com/grpc/grpc/tree/74bba2c90a4f4607674a01ec1c0b634708fea887/examples/python/multiprocessing
[PID 19271] Binding to 'localhost:50976'
[PID 19292] Starting new server.
[PID 19293] Starting new server.
[PID 19294] Starting new server.
[PID 19295] Starting new server.
[PID 19296] Starting new server.
[PID 19297] Starting new server.
[PID 19298] Starting new server.
[PID 19299] Starting new server.
[PID 19300] Starting new server.
[PID 19301] Starting new server.
[PID 19302] Starting new server.
[PID 19303] Starting new server.
[PID 19304] Starting new server.
[PID 19305] Starting new server.
[PID 19306] Starting new server.
[PID 19307] Starting new server.
I do see multiple server processes started. However, on running the client, I see only one of the server PID logged in server logs. Sample logs below. I expected it to be spread across all the server processes. Am I missing something here?
[PID 19295] Determining primality of 1139
[PID 19295] Determining primality of 779
[PID 19295] Determining primality of 1709
[PID 19295] Determining primality of 563
[PID 19295] Determining primality of 1493
[PID 19295] Determining primality of 226
[PID 19295] Determining primality of 1140
[PID 19295] Determining primality of 2027
[PID 19295] Determining primality of 2334
[PID 19295] Determining primality of 564
[PID 19295] Determining primality of 1494

This seems to be a problem with OSX. I tried this in Ubuntu and it works fine with all the server PIDs being used.

Related

EC2 Linux instance crashes every few hours

I have installed a WordPress site in AWS EC2 t3.micro on platform Linux/UNIX. The ec2 instance stops responding every few hours. That means if I try to call the website from the browser I get "This site can't be reached" message. The site starts to work again if I reboot the instance from the ec2 console. The inbound rules for HTTP and HTTPS set to 0.0.0.0/0. There is a number of website visitors. There is 4.2G available space on the EC2 instance. The latest error log entries are:
[Tue Jul 12 09:01:50.142638 2022] [mpm_prefork:notice] [pid 566] AH00163: Apache/2.4.52 (Ubuntu) OpenSSL/3.0.2 configured -- resuming normal operations
[Tue Jul 12 09:01:50.142711 2022] [core:notice] [pid 566] AH00094: Command line: '/usr/sbin/apache2'
[Tue Jul 12 10:23:11.216290 2022] [php:warn] [pid 1077] [client X.X.X.X:57861] PHP Warning: Undefined array key "referrer" in /var/www/html/wp-content/plugins/elementor-pro/modules/forms/classes/form-record.php on line 179, referer: https://SITE-NAME-REMOVED/contact-us/
[Tue Jul 12 10:23:11.217667 2022] [php:warn] [pid 1077] [client X.X.X.X:57861] PHP Warning: Undefined array key "referrer" in /var/www/html/wp-content/plugins/elementor-pro/modules/forms/classes/form-record.php on line 179, referer: https://SITE-NAME-REMOVED/contact-us/
sh: 1: /usr/sbin/sendmail: not found
[Mon Jul 11 00:00:01.527769 2022] [mpm_prefork:notice] [pid 570] AH00163: Apache/2.4.52 (Ubuntu) OpenSSL/3.0.2 configured -- resuming normal operations
[Mon Jul 11 00:00:01.527800 2022] [core:notice] [pid 570] AH00094: Command line: '/usr/sbin/apache2'
[Mon Jul 11 13:44:17.339898 2022] [mpm_prefork:notice] [pid 577] AH00163: Apache/2.4.52 (Ubuntu) OpenSSL/3.0.2 configured -- resuming normal operations
[Mon Jul 11 13:44:17.347833 2022] [core:notice] [pid 577] AH00094: Command line: '/usr/sbin/apache2'
[Mon Jul 11 13:44:26.721451 2022] [php:warn] [pid 727] [client x.X.x.x:35130] PHP Warning: Undefined array key "referrer" in /var/www/html/wp-content/plugins/elementor-pro/modules/forms/classes/form-record.php on line 179, referer: https://SITE-NAME-REMOVED/contact-us/
[Mon Jul 11 13:44:26.722285 2022] [php:warn] [pid 727] [client x.x.x.x:35130] PHP Warning: Undefined array key "referrer" in /var/www/html/wp-content/plugins/elementor-pro/modules/forms/classes/form-record.php on line 179, referer: https://SITE-NAME-REMOVED/contact-us/
sh: 1: /usr/sbin/sendmail: not found
[Mon Jul 11 14:37:11.427820 2022] [mpm_prefork:notice] [pid 577] AH00169: caught SIGTERM, shutting down
[Mon Jul 11 17:32:49.756249 2022] [mpm_prefork:notice] [pid 600] AH00163: Apache/2.4.52 (Ubuntu) OpenSSL/3.0.2 configured -- resuming normal operations
[Mon Jul 11 17:32:49.756835 2022] [core:notice] [pid 600] AH00094: Command line: '/usr/sbin/apache2'
[Mon Jul 11 20:15:40.358852 2022] [mpm_prefork:notice] [pid 600] AH00169: caught SIGTERM, shutting down
Could anyone please advise?

XAMPP / WP localhost loads one website fine, but Connection Reset on second

I am running the latest XAMPP and Wordpress on my Windows 10 machine, and everything has been working fine for more than a week. I run two websites under XAMPP/htdocs, web1 and web2. This morning Chrome said Connection Reset for web2.
localhost/dashboard loads the XAMPP page correctly.
localhost/web1 loads web1 correctly.
From this I conclude that XAMPP, Apache, WP, and MySql are all working correctly, for web1.
But for some reason Chrome and IE get Connection Reset errors on web2.
I can't log into the wp-admin screen on web2 either.
I've looked for solutions on the net, emptied browser caches, etc, and even did a 'netsh winsock reset' on the whole computer, but with no success.
I think it's something wrong with wordpress on website 2, because web1 works fine, right beside web2. Does anyone have any ideas on how to troubleshoot this? I may end up reinstalling wordpress and all my plugins, etc.
Here's my apache error log. Not sure if these errors are relevant, because they are in the log when everything was working fine, too.
[Sat Oct 29 09:11:23.875588 2016] [mpm_winnt:notice] [pid 2248:tid 528] AH00428: Parent: child process 16144 exited with status 255 -- Restarting.
[Sat Oct 29 09:11:24.084459 2016] [ssl:warn] [pid 2248:tid 528] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Sat Oct 29 09:11:24.105497 2016] [mpm_winnt:notice] [pid 2248:tid 528] AH00455: Apache/2.4.23 (Win32) OpenSSL/1.0.2h PHP/5.6.24 configured -- resuming normal operations
[Sat Oct 29 09:11:24.105497 2016] [mpm_winnt:notice] [pid 2248:tid 528] AH00456: Apache Lounge VC11 Server built: Jul 7 2016 11:13:22
[Sat Oct 29 09:11:24.105497 2016] [core:notice] [pid 2248:tid 528] AH00094: Command line: 'C:\\Users\\jameson\\Documents\\xampp\\apache\\bin\\httpd.exe -d C:/Users/jameson/Documents/XAMPP/apache'
[Sat Oct 29 09:11:24.106499 2016] [mpm_winnt:notice] [pid 2248:tid 528] AH00418: Parent: Created child process 17048
[Sat Oct 29 09:11:24.477157 2016] [ssl:warn] [pid 17048:tid 500] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Sat Oct 29 09:11:24.563811 2016] [ssl:warn] [pid 17048:tid 500] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Sat Oct 29 09:11:24.585366 2016] [mpm_winnt:notice] [pid 17048:tid 500] AH00354: Child: Starting 150 worker threads.
[Sat Oct 29 09:11:25.869511 2016] [mpm_winnt:notice] [pid 2248:tid 528] AH00428: Parent: child process 17048 exited with status 255 -- Restarting.
I finally gave up, reinstalled wordpress, and imported an old backup of the site. I lost a tiny bit of work (my backup was recent), but in total it was far less work than trying to debug the failed site.
One of the biggest problems with a "Connection reset" error is that you can't easily interact with the site through a browser. Unless you know exactly what the problem is under the hood (I didn't know), and know exactly what system / wordpress files to change (I didn't know), debugging is impossible.
I'm answering this question and closing it so that others might benefit from my experience, and reinstall their own failed site before wasting too much time like I did.

Error while installing wordpress on CentOS 7

I´ve got a problem with installing wordpress on centos 7.
I used this guide to install it cause I´m quite new to linux:
https://www.digitalocean.com/community/tutorials/how-to-install-wordpress-on-centos-7
I did everything step by step but it didn´t work. So I decided to reinstall my root server cause I wanted to have a new clean machine on which I could try it again. Then I used this guide to install it:
http://www.linuxveda.com/2015/09/15/install-wordpress-centos-7/
Same error as before..
The last entries in my error_log are:
[Wed Apr 13 12:16:06.794902 2016] [:error] [pid 23495] [client 66.249.93.167:41393] PHP Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0
[Wed Apr 13 12:16:06.794974 2016] [:error] [pid 23495] [client 66.249.93.167:41393] PHP Fatal error: Unknown: Failed opening required '/home/Soluna/homepages/stormcloud/index.php' (include_path='.:/usr/share/pear:/usr/share/php') in Unknown on line 0
[Wed Apr 13 12:16:07.352614 2016] [:error] [pid 23496] [client 79.196.171.71:51928] PHP Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0
[Wed Apr 13 12:16:07.352706 2016] [:error] [pid 23496] [client 79.196.171.71:51928] PHP Fatal error: Unknown: Failed opening required '/home/Soluna/homepages/stormcloud/index.php' (include_path='.:/usr/share/pear:/usr/share/php') in Unknown on line 0
[Wed Apr 13 12:16:07.671419 2016] [:error] [pid 23497] [client 5.79.100.165:49709] PHP Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0
[Wed Apr 13 12:16:07.671488 2016] [:error] [pid 23497] [client 5.79.100.165:49709] PHP Fatal error: Unknown: Failed opening required '/home/Soluna/homepages/stormcloud/index.php' (include_path='.:/usr/share/pear:/usr/share/php') in Unknown on line 0
[Wed Apr 13 12:16:18.058248 2016] [:error] [pid 23494] [client 79.196.171.71:51933] PHP Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0
[Wed Apr 13 12:16:18.058303 2016] [:error] [pid 23494] [client 79.196.171.71:51933] PHP Fatal error: Unknown: Failed opening required '/home/Soluna/homepages/stormcloud/index.php' (include_path='.:/usr/share/pear:/usr/share/php') in Unknown on line 0
[Wed Apr 13 12:16:21.985259 2016] [:error] [pid 23495] [client 79.196.171.71:51934] PHP Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0
[Wed Apr 13 12:16:21.985311 2016] [:error] [pid 23495] [client 79.196.171.71:51934] PHP Fatal error: Unknown: Failed opening required '/home/Soluna/homepages/stormcloud/index.php' (include_path='.:/usr/share/pear:/usr/share/php') in Unknown on line 0
Can anyone help me? Since now I´ve got nothing installed on the server except teamspeak 3. On my old root server (Hetzner Online) everything worked well but now it doesn´t...Any ideas of how to fix it? I already changed the permissions of all wordpress files but still the same error..
They key is
Permission denied
Check permissions of the folder and files where you are storaging your wordpress files, apache should be able to read them.

AWS Wordpress Site Crashed

Site was working fine this morning and now just a white screen after about a 45 second load. Latency is super high and saw a huge spike in database requests before crash. Here is some info from the error log:
[Tue Jan 20 19:35:35.758727 2015] [:error] [pid 5259] [client 10.164.61.169:9962] PHP Notice: Undefined offset: 0 in /var/app/current/content/themes/thereserve/_modules/z_interactive_map/_admin/settings-properties.php on line 217
[Tue Jan 20 19:35:35.761324 2015] [:error] [pid 5259] [client 10.164.61.169:9962] PHP Notice: Trying to get property of non-object in /var/app/current/content/themes/thereserve/_modules/z_interactive_map/_admin/settings-properties.php on line 217
[Tue Jan 20 19:41:34.521481 2015] [mpm_prefork:error] [pid 1867] AH00161: server reached MaxRequestWorkers setting, consider raising the MaxRequestWorkers setting
[Tue Jan 20 20:53:29.784736 2015] [mpm_prefork:notice] [pid 1867] AH00171: Graceful restart requested, doing restart
[Tue Jan 20 20:53:34.308282 2015] [auth_digest:notice] [pid 1867] AH01757: generating secret for digest authentication ...
[Tue Jan 20 20:53:34.344476 2015] [lbmethod_heartbeat:notice] [pid 1867] AH02282: No slotmem from mod_heartmonitor
[Tue Jan 20 20:53:34.427428 2015] [mpm_prefork:notice] [pid 1867] AH00163: Apache/2.4.6 (Amazon) configured -- resuming normal operations
[Tue Jan 20 20:53:34.427451 2015] [core:notice] [pid 1867] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
The fact that the "server reached MaxRequestWorkers setting" is a little alarming. I can't answer why that happens, but that might be the result of another problem.
If hitting the MaxRequestWorkers setting itself is not the RESULT of another problem but the problem itself, you can raise the "MaxRequestWorkers" ceiling in /etc/apache2/mods-available/mpm_worker.conf, then restart Apache.

Cannot access Wordpress dashboard through WAMP

I can access the actual wordpress site via WAMP's localhost route, but I cannot log into the admin/dashboard page of the wordpress site.
I think it is a problem with apache.
Can anybody help me?
here are messages from the apache error logs:
[Sun Nov 03 07:11:17.294107 2013] [mpm_winnt:notice] [pid 2700:tid 416] AH00422: Parent: Received shutdown signal -- Shutting down the server.
[Sun Nov 03 07:11:19.296221 2013] [mpm_winnt:notice] [pid 5784:tid 324] AH00364: Child: All worker threads have exited.
[Sun Nov 03 07:11:19.328223 2013] [mpm_winnt:notice] [pid 2700:tid 416] AH00430: Parent: Child process 5784 exited successfully.
[Sun Nov 03 07:11:22.842424 2013] [mpm_winnt:notice] [pid 5408:tid 416] AH00455: Apache/2.4.4 (Win32) PHP/5.4.16 configured -- resuming normal operations
[Sun Nov 03 07:11:22.842424 2013] [mpm_winnt:notice] [pid 5408:tid 416] AH00456: Server built: Feb 23 2013 13:07:34
[Sun Nov 03 07:11:22.842424 2013] [core:notice] [pid 5408:tid 416] AH00094: Command line: 'c:\\wamp\\bin\\apache\\apache2.4.4\\bin\\httpd.exe -d C:/wamp/bin/apache/Apache2.4.4'
[Sun Nov 03 07:11:22.844424 2013] [mpm_winnt:notice] [pid 5408:tid 416] AH00418: Parent: Created child process 4348
[Sun Nov 03 07:11:24.173500 2013] [mpm_winnt:notice] [pid 4348:tid 324] AH00354: Child: Starting 150 worker threads.
More info:
The error is not a 404. Rather wordpress doesnt recognize my username/password.
final edit:
found a solution to my problem:
http://www.velvetblues.com/web-development-blog/how-to-add-an-admin-user-to-a-wordpress-database/

Resources