Thinking-sphinx FATAL: failed to create binlog.001, error=Too many open files - sphinx

I am using Sphinx 2.2.11-id64-release and gem 'thinking-sphinx', '3.3.0'.
rake ts:configureworks fine and generated development development.sphinx.conf
But when running sphinx rake ts:index ts:start it fails and shows these errors in logs:
[Fri Dec 21 18:00:19.858 2018] [31823] WARNING: index 'section_not_today_1_with_text_89_idx_core': preload: failed to open /home/tyler/nmir/db/sphinx/development1/89/section_not_today_1_with_text_89_idx_core.spa: Too many open files; NOT SERVING
[Fri Dec 21 18:00:19.858 2018] [31823] WARNING: index 'section_today_0_with_text_address_89_idx_core': preload: failed to open /home/tyler/nmir/db/sphinx/development0/89/section_today_0_with_text_address_89_idx_core.spa: Too many open files; NOT SERVING
[Fri Dec 21 18:00:19.858 2018] [31823] WARNING: index 'section_not_today_0_with_text_address_89_idx_core': preload: failed to open /home/tyler/nmir/db/sphinx/development0/89/section_not_today_0_with_text_address_89_idx_core.spa: Too many open files; NOT SERVING
[Fri Dec 21 18:00:19.859 2018] [31823] WARNING: index 'section_today_1_with_text_address_89_idx_core': preload: failed to open /home/tyler/nmir/db/sphinx/development1/89/section_today_1_with_text_address_89_idx_core.spa: Too many open files; NOT SERVING
[Fri Dec 21 18:00:19.859 2018] [31823] WARNING: index 'section_not_today_1_with_text_address_89_idx_core': preload: failed to open /home/tyler/nmir/db/sphinx/development1/89/section_not_today_1_with_text_address_89_idx_core.spa: Too many open files; NOT SERVING
[Fri Dec 21 18:00:19.860 2018] [31823] WARNING: index 'section_today_0_with_text_90_idx_core': preload: failed to open /home/tyler/nmir/db/sphinx/development0/90/section_today_0_with_text_90_idx_core.spa: Too many open files; NOT SERVING
[Fri Dec 21 18:00:19.860 2018] [31823] WARNING: index 'section_not_today_0_with_text_90_idx_core': preload: failed to open /home/tyler/nmir/db/sphinx/development0/90/section_not_today_0_with_text_90_idx_core.spa: Too many open files; NOT SERVING
[Fri Dec 21 18:00:19.860 2018] [31823] WARNING: index 'section_today_1_with_text_90_idx_core': preload: failed to open /home/tyler/nmir/db/sphinx/development1/90/section_today_1_with_text_90_idx_core.spa: Too many open files; NOT SERVING
[Fri Dec 21 18:00:19.861 2018] [31823] WARNING: index 'section_not_today_1_with_text_90_idx_core': preload: failed to open /home/tyler/nmir/db/sphinx/development1/90/section_not_today_1_with_text_90_idx_core.spa: Too many open files; NOT SERVING
[Fri Dec 21 18:00:19.861 2018] [31823] WARNING: index 'section_today_0_with_text_address_90_idx_core': preload: failed to open /home/tyler/nmir/db/sphinx/development0/90/section_today_0_with_text_address_90_idx_core.spa: Too many open files; NOT SERVING
[Fri Dec 21 18:00:19.862 2018] [31823] WARNING: index 'section_not_today_0_with_text_address_90_idx_core': preload: failed to open /home/tyler/nmir/db/sphinx/development0/90/section_not_today_0_with_text_address_90_idx_core.spa: Too many open files; NOT SERVING
[Fri Dec 21 18:00:19.862 2018] [31823] WARNING: index 'section_today_1_with_text_address_90_idx_core': preload: failed to open /home/tyler/nmir/db/sphinx/development1/90/section_today_1_with_text_address_90_idx_core.spa: Too many open files; NOT SERVING
[Fri Dec 21 18:00:19.863 2018] [31823] WARNING: index 'section_not_today_1_with_text_address_90_idx_core': preload: failed to open /home/tyler/nmir/db/sphinx/development1/90/section_not_today_1_with_text_address_90_idx_core.spa: Too many open files; NOT SERVING
[Fri Dec 21 18:00:19.863 2018] [31823] WARNING: index 'section_today_0_with_text_91_idx_core': preload: failed to open /home/tyler/nmir/db/sphinx/development0/91/section_today_0_with_text_91_idx_core.spa: Too many open files; NOT SERVING
[Fri Dec 21 18:00:19.864 2018] [31823] WARNING: index 'section_not_today_0_with_text_91_idx_core': preload: failed to open /home/tyler/nmir/db/sphinx/development0/91/section_not_today_0_with_text_91_idx_core.spa: Too many open files; NOT SERVING
[Fri Dec 21 18:00:19.864 2018] [31823] WARNING: index 'section_today_1_with_text_91_idx_core': preload: failed to open /home/tyler/nmir/db/sphinx/development1/91/section_today_1_with_text_91_idx_core.spa: Too many open files; NOT SERVING
[Fri Dec 21 18:00:19.864 2018] [31823] WARNING: index 'section_not_today_1_with_text_91_idx_core': preload: failed to open /home/tyler/nmir/db/sphinx/development1/91/section_not_today_1_with_text_91_idx_core.spa: Too many open files; NOT SERVING
[Fri Dec 21 18:00:19.865 2018] [31823] WARNING: index 'section_today_0_with_text_address_91_idx_core': preload: failed to open /home/tyler/nmir/db/sphinx/development0/91/section_today_0_with_text_address_91_idx_core.spa: Too many open files; NOT SERVING
[Fri Dec 21 18:00:19.865 2018] [31823] WARNING: index 'section_not_today_0_with_text_address_91_idx_core': preload: failed to open /home/tyler/nmir/db/sphinx/development0/91/section_not_today_0_with_text_address_91_idx_core.spa: Too many open files; NOT SERVING
[Fri Dec 21 18:00:19.865 2018] [31823] WARNING: index 'section_today_1_with_text_address_91_idx_core': preload: failed to open /home/tyler/nmir/db/sphinx/development1/91/section_today_1_with_text_address_91_idx_core.spa: Too many open files; NOT SERVING
[Fri Dec 21 18:00:19.866 2018] [31823] WARNING: index 'section_not_today_1_with_text_address_91_idx_core': preload: failed to open /home/tyler/nmir/db/sphinx/development1/91/section_not_today_1_with_text_address_91_idx_core.spa: Too many open files; NOT SERVING
[Fri Dec 21 18:00:19.868 2018] [31823] FATAL: failed to create /home/tyler/nmir/tmp/binlog/development/binlog.001: errno=24, error=Too many open files
[Fri Dec 21 18:00:19.915 2018] [31822] watchdog: main process 31823 exited cleanly (exit code 1), shutting down

As #barryhunter has noted, the issue here is the number of files that you're allowed to open at an operating system level. You're hitting this because of the large number of Sphinx indices you've got defined - but there should be ways around it - perhaps by using ulimit, as Barry's linked to in the comment.

Solved this issue by adding the following line to both /etc/systemd/system.conf and /etc/systemd/user.conf
DefaultLimitNOFILE=65000

Related

Can't start MAMP servers

i am unable to start servers, the 'start servers'-icon flashes green for a second and nothing happens. This is what i get in the apache_error log:
[Mon Dec 26 03:36:16 2016] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Mon Dec 26 03:36:17 2016] [notice] Digest: generating secret for digest authentication ...
[Mon Dec 26 03:36:17 2016] [notice] Digest: done
[Mon Dec 26 03:36:18 2016] [notice] Apache/2.2.31 (Win32) DAV/2 mod_ssl/2.2.31 OpenSSL/1.0.2e mod_fcgid/2.3.9 mod_wsgi/3.4 Python/2.7.6 PHP/7.0.9 mod_perl/2.0.8 Perl/v5.16.3 configured -- resuming normal operations
[Mon Dec 26 03:36:18 2016] [notice] Server built: May 6 2016 10:19:53
[Mon Dec 26 03:36:18 2016] [crit] (22)Invalid argument: Parent: Failed to create the child process.
[Mon Dec 26 03:36:18 2016] [crit] (OS 6)Invalid reference. : master_main: create child process failed. Exiting.
I had the same problem on Windows 10 and disabling Perl worked for me:
C:\MAMP\conf\apache\httpd.conf
...
LoadModule perl_module modules/mod_perl.so
...
I hope this helps.

XAMPP Apache won't start after i added phpPgAdmin alias

I want to install phpPgAdmin with XAMPP on Windows. After i did all the steps, my Apache module on XAMPP won't start. I got this error log
[Mon Nov 14 16:36:16.661538 2016] [ssl:warn] [pid 10612:tid 504] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Mon Nov 14 16:36:16.824335 2016] [core:warn] [pid 10612:tid 504] AH00098: pid file C:/xampp/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Mon Nov 14 16:36:16.924133 2016] [ssl:warn] [pid 10612:tid 504] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Mon Nov 14 16:36:17.724645 2016] [mpm_winnt:notice] [pid 10612:tid 504] AH00455: Apache/2.4.23 (Win32) OpenSSL/1.0.2h PHP/7.0.9 configured -- resuming normal operations
[Mon Nov 14 16:36:17.724645 2016] [mpm_winnt:notice] [pid 10612:tid 504] AH00456: Apache Lounge VC14 Server built: Jul 1 2016 11:09:37
[Mon Nov 14 16:36:17.724645 2016] [core:notice] [pid 10612:tid 504] AH00094: Command line: 'c:\\xampp\\apache\\bin\\httpd.exe -d C:/xampp/apache'
[Mon Nov 14 16:36:17.724645 2016] [mpm_winnt:notice] [pid 10612:tid 504] AH00418: Parent: Created child process 7288
[Mon Nov 14 16:36:18.611254 2016] [ssl:warn] [pid 7288:tid 584] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Mon Nov 14 16:36:18.796715 2016] [ssl:warn] [pid 7288:tid 584] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Mon Nov 14 16:36:18.850157 2016] [mpm_winnt:notice] [pid 7288:tid 584] AH00354: Child: Starting 150 worker threads.
[Mon Nov 14 16:36:22.814454 2016] [mpm_winnt:crit] [pid 7288:tid 584] AH02538: Child: Parent process exited abruptly. Child process is ending
I tried to remove the phpPgAdmin alias from httpd-xamp.conf, and it worked again, but my phpPgAdmin won't work (obviously).
I've uncommented the php_pgsql.dll and php_pdo_pgsql.dll extension at php.ini
extension=php_pdo_sqlite.dll
extension=php_pgsql.dll
This is my configuration on config.inc.php from phpPgAdmin folder
$conf['servers'][0]['host'] = 'localhost';
$conf['servers'][0]['pg_dump_path'] = 'C:\xampp\pgsql\9.3\bin\pg_dump.exe';
$conf['servers'][0]['pg_dumpall_path'] = 'C:\xampp\pgsql\9.3\bin\pg_dumpall.exe';
$conf['extra_login_security'] = false;
This is my alias configuration on httpd-xampp.conf
Alias /phppgadmin “C:/xampp/phpPgAdmin/”
<Directory “C:/xampp/phpPgAdmin”>
AllowOverride AuthConfig
Order allow,deny
Allow from all
</Directory>
I'm new with XAMPP and PHP, so i don't know what's the problem. Anyone can help?
I don't know whether my answer is not too late, but you just need to change curly braces “” in your paths to regular ones "", like this
"C:/xampp/phppgadmin/"

Error with Schedulers and Inbound Emails in sugarcrm

We use SugarCRM CE 6.5.16 on Centos 6.5.
I am getting this error :
Wed Apr 9 15:37:10 2014 [10389][1][ERROR] Unable to load custom logic file: include/SugarSearchEngine/SugarSearchEngineQueueManager.php
The real problem is that i dont receive emails from my inbound email.
They are all set up.I added the cron job to the crontab. Well actually I receive some emails, like 3 or 4 from 100. In the schedulers the job status is "running" and last successful run is "Never".
Every other scheduler job has a status "Done" and has last successful run.
I repaired inbound emails , scheduler jobs but with no effect.
The only thing i found is this :
http://suitecrm.com/forum/search?query=SugarSearchEngineQueueManager&searchdate=all&childforums=1
So I commented out this code and i no longer get the error but still I don't receive emails.
I don't know what else to do.
Please help me if you can !Thanks !
EDIT
I found that
"This file is only included in PRO version and it's useless in Community Edition.
Code Fix:
1. Comment code in /custom/Extension/application/Ext/LogicHooks/SugarFTSHooks.php
Do a Fast Rebuild from Administration (index.php?module=Administration&action=repair). This process will rebuild the piece of code that uses the SugarCRM to call inexistent file SugarSearchEngineQueueManager /custom/application/Ext/LogicHooks/logichooks.ext.php"
So I commented out the code and did the rebuild (yeah i did it before but now i know for sure that this file should not be in Sugarcrm CE )
The error doesn't show anymore but my scheduler still stays "running" and nothings happens , except:
When i did this (What Matthew Poer said) , I received 4 emails just like before... so something is causing a problem.
delete from job_queue where scheduler_id = 'THE_SCHEDULER_ID';
update schedulers set last_run = subdate(now(),360) where id = 'THE_SCHEDULER_ID';
EDIT 2:
This is from php error_log
[Sun Apr 13 03:34:27 2014] [notice] Digest: generating secret for digest authentication ...
[Sun Apr 13 03:34:27 2014] [notice] Digest: done
[Sun Apr 13 03:34:33 2014] [notice] Apache/2.2.15 (Unix) DAV/2 mod_nss/2.2.15 NSS/3.14.0.0 Basic ECC PHP/5.3.3 mod_ssl/2.2.15 OpenSSL/1.0.0-fips mod_wsgi/3.2 Python/2.6.6 mod_perl/2.0.4 Perl/v5.10.1 configured -- resuming normal operations
[Sun Apr 13 12:22:52 2014] [error] [client 122.155.18.51] File does not exist: /usr/share/phpMyAdmin/translators.html
[Sun Apr 13 13:45:31 2014] [error] [client 122.155.18.51] File does not exist: /usr/share/phpMyAdmin/translators.html
[Sun Apr 13 15:43:39 2014] [error] [client 66.249.66.74] File does not exist: /opt/otrs/var/httpd/htdocs/js/js-cache/ModuleJS_784dc12bf89d72db064caa6e8690168b.js
[Sun Apr 13 15:43:40 2014] [error] [client 66.249.66.74] File does not exist: /opt/otrs/var/httpd/htdocs/skins/Customer/default/css-cache/CommonCSS_b1f924c426a0e1a9f1553197a2ce25a4.css
[Sun Apr 13 15:43:41 2014] [error] [client 66.249.66.74] File does not exist: /opt/otrs/var/httpd/htdocs/js/js-cache/CommonJS_7f98ddff2f339e3b515f7901d82600bb.js
[Mon Apr 14 11:09:04 2014] [error] [client 192.168.10.1] PHP Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /usr/share/phpMyAdmin/version_check.php on line 16, referer: http://support.expert-m.net/phpmyadmin/main.php?token=d2e60372f8b5d6d53f0c3c80a536be27
[Mon Apr 14 11:09:04 2014] [error] [client 192.168.10.1] PHP Warning: file_get_contents(http://www.phpmyadmin.net/home_page/version.json): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known in /usr/share/phpMyAdmin/version_check.php on line 16, referer: http://support.expert-m.net/phpmyadmin/main.php?token=d2e60372f8b5d6d53f0c3c80a536be27
[Mon Apr 14 12:45:25 2014] [error] [client 178.235.72.68] client sent HTTP/1.1 request without hostname (see RFC2616 section 14.23): /w00tw00t.at.ISC.SANS.DFind:)
This is from the logs folder of SugarCRM, error.log
[Mon Apr 14 08:58:59 2014] [error] [client 192.168.10.1] PHP Notice: Undefined index: 8854a79c-6171-036c-e7df-534548e8bc81 in /var/www/sugarcrm/public_html/modules/Emails/EmailUIAjax.php on line 879, referer: http://sugarcrm.support.expert-m.net/index.php?module=Emails&action=index&parentTab=All
[Mon Apr 14 08:58:59 2014] [error] [client 192.168.10.1] PHP Notice: Undefined index: 8854a79c-6171-036c-e7df-534548e8bc81 in /var/www/sugarcrm/public_html/modules/Emails/EmailUIAjax.php on line 880, referer: http://sugarcrm.support.expert-m.net/index.php?module=Emails&action=index&parentTab=All
[Mon Apr 14 11:22:17 2014] [error] [client 192.168.10.1] PHP Notice: Undefined index: 8854a79c-6171-036c-e7df-534548e8bc81 in /var/www/sugarcrm/public_html/modules/Emails/EmailUIAjax.php on line 879, referer: http://sugarcrm.support.expert-m.net/index.php?module=Emails&action=index&parentTab=All
[Mon Apr 14 11:22:17 2014] [error] [client 192.168.10.1] PHP Notice: Undefined index: 8854a79c-6171-036c-e7df-534548e8bc81 in /var/www/sugarcrm/public_html/modules/Emails/EmailUIAjax.php on line 880, referer: http://sugarcrm.support.expert-m.net/index.php?module=Emails&action=index&parentTab=All
[Mon Apr 14 11:24:47 2014] [error] [client 192.168.10.1] File does not exist: /var/www/sugarcrm/public_html/favicon.ico
I didn't paste all the info from the logs. There is more but the errors are repeating.
The file include/SugarSearchEngine/SugarSearchEngineQueueManager.php won't exist in your system because it's a Pro+ feature.
To reset a scheduler entry that got "stuck," delete the scheduler information from the job queue in the database and reset the last_run value. Find the ID of the scheduler from the URL within SugarCRM or by select id,name from schedulers. Once you have the ID of this scheduler, run this two queries:
delete from job_queue where scheduler_id = 'THE_SCHEDULER_ID';
update schedulers set last_run = subdate(now(),360) where id = 'THE_SCHEDULER_ID';

Facebook file doesn't exist showing up continuously in apache log

I am seeing these error entries in our apache logs all the time.
We have the FB like button on our website
Any suggestions on what's causing it, or how to rectify?
[Fri Oct 18 07:50:22 2013] [error] [client 108.168.210.164] File does not exist: /var/www/www.facebook.com
[Fri Oct 18 07:50:49 2013] [error] [client 108.168.210.164] File does not exist: /var/www/www.facebook.com
[Fri Oct 18 07:50:54 2013] [error] [client 5.10.84.4] File does not exist: /var/www/www.facebook.com
More often than not, Apache errors of the form
[Fri Oct 18 07:50:22 2013] [error] [client 108.168.210.164] File does not exist: /var/www/www.hostname.com
indicate that the client has received a relative URL, ie one without "http://".

Default Index Controller Not Being Called With New Zend Studio Project

I have just purchased a license for Zend Studio 9. I have only a minimal amount of experience with the Zend framework, and no previous experience with Zend Studio. I am using http://framework.zend.com/manual/en/ as a tutorial on the framework and have browsed through the resources located at http://www.zend.com/en/products/studio/resources for help with the studio software.
My main problem is that after creating a new Zend project with zstudio, I'm not seeing the initial welcome message. Here are the steps I am using:
I've already installed the Zend Server and confirmed that web apps are working (made some test files, they all parsed correctly).
Create a new project with Zend Studio.
a. File->New->Local PHP Project
b. For location, I am using C:\Program Files\Zend\Apache2\htdocs.
c. For version I used the default "Zend Framework 1.11.11 (Built-in)"
I go to http://localhost:81/projectname. Instead of the default index controller being called, I just see my directory structure.
Addition info:
OS: Windows 7
PHP version: 5.3
ERROR LOGS:
>[Wed Nov 30 14:32:30 2011] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
>[Wed Nov 30 14:32:30 2011] [warn] pid file C:/Program Files (x86)/Zend/Apache2/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
>[Wed Nov 30 14:32:30 2011] [notice] Digest: generating secret for digest authentication ...
>[Wed Nov 30 14:32:30 2011] [notice] Digest: done
>[Wed Nov 30 14:32:31 2011] [notice] Apache/2.2.16 (Win32) mod_ssl/2.2.16 OpenSSL/0.9.8o configured -- resuming normal operations
>[Wed Nov 30 14:32:31 2011] [notice] Server built: Aug 8 2010 16:45:53
>[Wed Nov 30 14:32:31 2011] [notice] Parent: Created child process 13788
>[Wed Nov 30 14:32:32 2011] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
>[Wed Nov 30 14:32:32 2011] [notice] Digest: generating secret for digest authentication ...
>[Wed Nov 30 14:32:32 2011] [notice] Digest: done
>[Wed Nov 30 14:32:33 2011] [notice] Child 13788: Child process is running
>[Wed Nov 30 14:32:33 2011] [notice] Child 13788: Acquired the start mutex.
>[Wed Nov 30 14:32:33 2011] [notice] Child 13788: Starting 64 worker threads.
>[Wed Nov 30 14:32:33 2011] [notice] Child 13788: Starting thread to listen on port 10081.
>[Wed Nov 30 14:32:33 2011] [notice] Child 13788: Starting thread to listen on port 81.
If you navigate to http://localhost:81/projectname/index/index does the correct screen load?
If so:
Check that the .htaccess file in your public directory contains the correct rewrite rules for Zend Framework.
Check your httpd.conf file and make sure index.php is added to the DirectoryIndex directive.
I think the solution is going to be the second bullet, but let me know what you find and I can help further if that doesn't work. Make sure to restart apache after you make any changes to httpd.conf.
Otherwise, report any errors you see when you access the controller directly, and check Apache's error_log file to see if you get any errors.