Why am I getting Stack Trace when I open Horizon? - laravel

I allocate enough memory for this. in php.ini memory_limit = 3G I don't understand why this happens. If anyone has come across this problem.
When I run рorizon with these settings.
'defaults' => [
'supervisor-1' => [
'connection' => 'redis',
'queue' => ['default'],
'balance' => 'auto',
'maxProcesses' => 1,
'maxTime' => 0,
'maxJobs' => 0,
'memory' => 2048,
'tries' => 1,
'timeout' => 200,
'nice' => 0,
],
],
'environments' => [
'local' => [
'supervisor-1' => [
'maxProcesses' => 400,
],
],
],
I am getting next errors:
Stack trace:
#0 /var/www/html/vendor/composer/ClassLoader.php(571): include()
#1 /var/www/html/vendor/composer/ClassLoader.php(428): Composer\Autoload\includeFile()
#2 /var/www/html/vendor/symfony/console/Input/ArgvInput.php(41): Composer\Autoload\ClassLoader->loadClass()
#3 /var/www/html/vendor/composer/ClassLoader.php(571): include('...')
#4 /var/www/html/vendor/composer/ClassLoader.php(428): Composer\Autoload\includeFile()
#5 /var/www/html/artisan(36): Composer\Autoload\ClassLoader->loadClass()
#6 {main}
thrown in /var/www/html/vendor/symfony/console/Input/Input.php on line 28
PHP Warning: require(/var/www/html/vendor/composer/autoload_static.php): Failed to open stream: Input/output error in /var/www/html/vendor/composer/autoload_real.php on line 33
PHP Fatal error: Uncaught Error: Failed opening required '/var/www/html/vendor/composer/autoload_static.php' (include_path='.:/usr/share/php') in /var/www/html/vendor/composer/autoload_real.php:33
Stack trace:
#0 /var/www/html/vendor/autoload.php(7): ComposerAutoloaderInit178bef08a42940d39635a033dd116c7e::getLoader()
#1 /var/www/html/artisan(18): require('...')
#2 {main}
thrown in /var/www/html/vendor/composer/autoload_real.php on line 33
PHP Warning: require_once(/var/www/html/vendor/composer/autoload_real.php): Failed to open stream: Input/output error in /var/www/html/vendor/autoload.php on line 5
PHP Fatal error: Uncaught Error: Failed opening required '/var/www/html/vendor/composer/autoload_real.php' (include_path='.:/usr/share/php') in /var/www/html/vendor/autoload.php:5
Stack trace:
#0 /var/www/html/artisan(18): require()
#1 {main}
thrown in /var/www/html/vendor/autoload.php on line 5
PHP Warning: include(/var/www/html/vendor/vlucas/phpdotenv/src/Repository/Adapter/AdapterInterface.php): Failed to open stream: Input/output error in /var/www/html/vendor/composer/ClassLoader.php on line 571
PHP Warning: include(): Failed opening '/var/www/html/vendor/composer/../vlucas/phpdotenv/src/Repository/Adapter/AdapterInterface.php' for inclusion (include_path='.:/usr/share/php') in /var/www/html/vendor/composer/ClassLoader.php on line 571
PHP Warning: include(/var/www/html/vendor/laravel/framework/src/Illuminate/Support/Reflector.php): Failed to open stream: Input/output error in /var/www/html/vendor/composer/ClassLoader.php on line 571
PHP Warning: include(): Failed opening '/var/www/html/vendor/composer/../laravel/framework/src/Illuminate/Support/Reflector.php' for inclusion (include_path='.:/usr/share/php') in /var/www/html/vendor/composer/ClassLoader.php on line 571
PHP Fatal error: Uncaught Error: Class "Illuminate\Support\Reflector" not found in /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php:227
I need to process a large number of requests and 400 is the optimal number of processes for proper operation
But when the maxProcess => 7 parameter is set, everything works fine. But it's too slow
All files are in place.
-rwxrwxrwx 1 sail sail 779502 Mar 12 22:33 autoload_static.php
-rwxrwxrwx 1 sail sail 2629 Mar 12 18:41 autoload_real.php
-rwxrwxrwx 1 sail sail 4453 Mar 8 16:17 Reflector.php

Related

Codeigniter mkdir: Permission denied error

How to resolve these errors?
A PHP Error was encountered
Severity: Warning
Message: mkdir(): Permission denied
Filename: drivers/Session_files_driver.php
Line Number: 136
Backtrace:
File: /var/www/html/application/controllers/Home.php
Line: 8
Function: __construct
File: /var/www/html/index.php
Line: 315
Function: require_once
Warning: Uncaught Exception: Session: Configured save path '/var/www/html/application/cache/session' is not a directory, doesn't exist or cannot be created. in /var/www/html/system/libraries/Session/drivers/Session_files_driver.php:138 Stack trace: #0 [internal function]: CI_Session_files_driver->open('/var/www/html/a...', 'ci_session') #1 /var/www/html/system/libraries/Session/Session.php(143): session_start() #2 /var/www/html/system/core/Loader.php(1281): CI_Session->__construct() #3 /var/www/html/system/core/Loader.php(1174): CI_Loader->_ci_init_library('Session', 'CI_', NULL, 'session') #4 /var/www/html/system/core/Loader.php(1037): CI_Loader->_ci_load_stock_library('Session', 'Session/', NULL, NULL) #5 /var/www/html/system/core/Loader.php(1082): CI_Loader->_ci_load_library('Session', NULL, NULL) #6 /var/www/html/system/core/Loader.php(218): CI_Loader->_ci_load_library('Session', NULL, NULL) #7 /var/www/html/system/core/Loader.php(202): CI_Loader->library('session', NULL) #8 /var/www/html/system/core/Loader.php(13 in /var/www/html/system/libraries/Session/drivers/Session_files_driver.php on line 138
Fatal error: session_start(): Failed to initialize storage module: user (path: /var/www/html/application/cache/session) in /var/www/html/system/libraries/Session/Session.php on line 143
A PHP Error was encountered
Severity: Error
Message: session_start(): Failed to initialize storage module: user (path: /var/www/html/application/cache/session)
Filename: Session/Session.php
Line Number: 143
Backtrace:
if you're using an apache2-Webserver, check the directory permissions for /var/www/html/application/cache/session. It has to be legible and writable for www-data user.
To set the permissions, simply run sudo chown -R www-data /var/www/html and sudo chmod -R u+rw /var/www/html. This sets the directory permissions recursively to your webroot and all subdirectories.

Exception in Wkhtml2pdf.php line 887: WKHTMLTOPDF didn't return any data in laravel

My all PDF working properly in previous server when i transfer my website to VPS it is not working.
Exception in Wkhtml2pdf.php line 887: WKHTMLTOPDF didn't return any data
in Wkhtml2pdf.php line 887
at Wkhtml2pdf->_render() in Wkhtml2pdf.php line 1030
at Wkhtml2pdf->output('I', 'Leave-2016-11-19 00:01:06.pdf') in Wkhtml2pdf.php line 242
After a long time, i resolve my problem myself.
For LARAVEL.
First open config/Wkhtml2pdf.php file
and
return array(
'debug' => false,
'binpath' => 'lib/',
'binfile' => 'wkhtmltopdf-amd64',
'output_mode' => 'I'
);
to
return array(
'debug' => true,
'binpath' => 'lib/',
'binfile' => 'wkhtmltopdf-amd64',
'output_mode' => 'I'
);
And run again in browser.
you see an array like this :
array:3 [▼
"input" => "/tmp/163448393.html"
"command" => "/var/www/html/somsv3/vendor/nitmedia/wkhtml2pdf/src/Nitmedia/Wkhtml2pdf/lib/wkhtmltopdf-amd64 --orientation 'Portrait' --page-size 'A4' "/tmp/163448393.html" -"
"content" => array:3 [▶]
]
here content is your PDF.
open "content" and fix permission issue of file give it chmod -R 777 "filename"
:)
Another possible error is QT patch missing for wkhtmltopdf
Explanation here: https://stackoverflow.com/a/64260740/2686510
Solution is to us patched version:
wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz
tar xvf wkhtmltox-0.12.4_linux-generic-amd64.tar.xz
mv wkhtmltox/bin/wkhtmlto* /usr/bin/
ln -nfs /usr/bin/wkhtmltopdf /usr/local/bin/wkhtmltopdf

FatalErrorException in PropelBundle.php line 29: Compile Error: Propel\PropelBundle\PropelBundle::boot(): Failed opening required

Im trying to use propel ORM with sympfony v-2.7
In my composer I've added this line
"propel/propel-bundle": "^1.4",
and installed this package successfully.
Then I load the Bundle into my karnel using this
$bundles = array(
new Propel\PropelBundle\PropelBundle(),
);
My config.yml settings
propel:
path: "%kernel.root_dir%/../vendor/propel"
phing_path: "%kernel.root_dir%/../vendor/phing"
logging: %kernel.debug%
dbal:
driver: %database_driver%
user: %database_user%
password: %database_password%
dsn: %database_driver%:host=%database_host%;dbname=%database_name%;charset=UTF8
options: {}
attributes: {}
But when I try to access- http://localhost/my-serp/web/
I got this Error
FatalErrorException in PropelBundle.php line 29:
Compile Error: Propel\PropelBundle\PropelBundle::boot(): Failed opening required 'D:\wamp\www\my-serp
\app/../vendor/propel/runtime/lib/Propel.php' (include_path='D:\wamp\www\my- serp\vendor/phing/phing/classes;D:\wamp
\www\my-serp\vendor/propel/propel1/runtime/lib;D:\wamp\www\my- serp\vendor/propel/propel1/generator/lib;.;C:\php\pear')
in PropelBundle.php line 29
at PropelBundle->boot() in bootstrap.php.cache line 2414
at Kernel->boot() in bootstrap.php.cache line 2442
at Kernel->handle() in app_dev.php line 28
at {main}() in app_dev.php line 0
I follow the documentation from github, can anybody say me what i've missed ??
Check/change your propel path to:
path: "%kernel.root_dir%/../vendor/propel/propel1"

Cloud Init Fails to Install Packages on CentOS 7 in EC2

I have a cloud config file defined on my EC2 instance in the user data. Many of the parts/actions are run by the server properly, but package installation seems to fail invariably:
#cloud-config
package-update: true
package-upgrade: true
# ...
packages:
- puppet3
- lvm2
- btrfs-progs
# ...
I see the following in the logs:
May 20 20:23:39 cloud-init[1252]: util.py[DEBUG]: Package update failed
Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/cloudinit/config/cc_package_update_upgrade_install.py", line 74, in handle
cloud.distro.update_package_sources()
File "/usr/lib/python2.6/site-packages/cloudinit/distros/rhel.py", line 278, in update_package_sources
["makecache"], freq=PER_INSTANCE)
File "/usr/lib/python2.6/site-packages/cloudinit/helpers.py", line 197, in run
results = functor(*args)
File "/usr/lib/python2.6/site-packages/cloudinit/distros/rhel.py", line 274, in package_command
util.subp(cmd, capture=False, pipe_cat=True, close_stdin=True)
File "/usr/lib/python2.6/site-packages/cloudinit/util.py", line 1529, in subp
cmd=args)
ProcessExecutionError: Unexpected error while running command.
Command: ['yum', '-t', '-y', 'makecache']
Exit code: 1
Reason: -
Stdout: ''
Stderr: ''
May 20 20:23:39 cloud-init[1252]: amazon.py[DEBUG]: Upgrade level: security
May 20 20:23:39 cloud-init[1252]: util.py[DEBUG]: Running command ['yum', '-t', '-y', '--exclude=kernel', '--exclude=nvidia*', '--exclude=cudatoolkit', '--security', '--sec-severity=critical', '--sec-severity=important', 'upgrade'] with allowed return codes [0] (shell=False, capture=False)
May 20 20:23:52 cloud-init[1252]: util.py[WARNING]: Package upgrade failed
May 20 20:23:52 cloud-init[1252]: util.py[DEBUG]: Package upgrade failed
Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/cloudinit/config/cc_package_update_upgrade_install.py", line 81, in handle
cloud.distro.upgrade_packages(upgrade_level, upgrade_exclude)
File "/usr/lib/python2.6/site-packages/cloudinit/distros/amazon.py", line 50, in upgrade_packages
return self.package_command('upgrade', args=args)
File "/usr/lib/python2.6/site-packages/cloudinit/distros/rhel.py", line 274, in package_command
util.subp(cmd, capture=False, pipe_cat=True, close_stdin=True)
File "/usr/lib/python2.6/site-packages/cloudinit/util.py", line 1529, in subp
cmd=args)
ProcessExecutionError: Unexpected error while running command.
Command: ['yum', '-t', '-y', '--exclude=kernel', '--exclude=nvidia*', '--exclude=cudatoolkit', '--security', '--sec-severity=critical', '--sec-severity=important', 'upgrade']
Exit code: 1
Reason: -
Stdout: ''
Stderr: ''
May 20 20:23:52 cloud-init[1252]: util.py[DEBUG]: Running command ['yum', '-t', '-y', 'install', 'puppet3', 'lvm2', 'btrfs-progs'] with allowed return codes [0] (shell=False, capture=False)
May 20 20:24:03 cloud-init[1252]: util.py[WARNING]: Failed to install packages: ['puppet3', 'lvm2', 'btrfs-progs']
May 20 20:24:03 cloud-init[1252]: util.py[DEBUG]: Failed to install packages: ['puppet3', 'lvm2', 'btrfs-progs']
Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/cloudinit/config/cc_package_update_upgrade_install.py", line 88, in handle
cloud.distro.install_packages(pkglist)
File "/usr/lib/python2.6/site-packages/cloudinit/distros/rhel.py", line 70, in install_packages
self.package_command('install', pkgs=pkglist)
File "/usr/lib/python2.6/site-packages/cloudinit/distros/rhel.py", line 274, in package_command
util.subp(cmd, capture=False, pipe_cat=True, close_stdin=True)
File "/usr/lib/python2.6/site-packages/cloudinit/util.py", line 1529, in subp
cmd=args)
ProcessExecutionError: Unexpected error while running command.
Command: ['yum', '-t', '-y', 'install', 'puppet3', 'lvm2', 'btrfs-progs']
Exit code: 1
Reason: -
Stdout: ''
Stderr: ''
May 20 20:24:03 cloud-init[1252]: cc_package_update_upgrade_install.py[WARNING]: 3 failed with exceptions, re-raising the last one
May 20 20:24:03 cloud-init[1252]: util.py[WARNING]: Running package-update-upgrade-install (<module 'cloudinit.config.cc_package_update_upgrade_install' from '/usr/lib/python2.6/site-packages/cloudinit/config/cc_package_update_upgrade_install.pyc'>) failed
May 20 20:24:03 cloud-init[1252]: util.py[DEBUG]: Running package-update-upgrade-install (<module 'cloudinit.config.cc_package_update_upgrade_install' from '/usr/lib/python2.6/site-packages/cloudinit/config/cc_package_update_upgrade_install.pyc'>) failed
Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/cloudinit/stages.py", line 553, in _run_modules
cc.run(run_name, mod.handle, func_args, freq=freq)
File "/usr/lib/python2.6/site-packages/cloudinit/cloud.py", line 63, in run
return self._runners.run(name, functor, args, freq, clear_on_fail)
File "/usr/lib/python2.6/site-packages/cloudinit/helpers.py", line 197, in run
results = functor(*args)
File "/usr/lib/python2.6/site-packages/cloudinit/config/cc_package_update_upgrade_install.py", line 111, in handle
raise errors[-1]
ProcessExecutionError: Unexpected error while running command.
Command: ['yum', '-t', '-y', 'install', 'puppet3', 'lvm2', 'btrfs-progs']
Exit code: 1
Reason: -
Stdout: ''
Stderr: ''
When I actually run the command yum -t -y install puppet3 lvm2 btrfs-progs as root, it just runs fine, but Cloud Init is failing to run it on its own.
Is there something I'm doing wrong here?
Evidently there was a bug fixed with later versions of the image. If this is happening to you, it may be a legitimate bug in Cloud-Init or your servers implementation of it. A package upgrade may fix the problem, also an update to the image will fix it globally.

ActionController::RoutingError: No route matches [GET] "/signup

Running into an intermittent Ruby on rails routing issues with devise. The error occurs maybe one in ten times and we are not sure why. Any help would be appreciated.
The error:
ActionController::RoutingError: No route matches [GET] "/signup/account"
... 27 non-project frames
1
File "/app/vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.14/lib/action_dispatch/middleware/debug_exceptions.rb" line 21 in call
2
File "/app/vendor/bundle/ruby/2.0.0/gems/rollbar-0.10.14/lib/rollbar/middleware/rails/show_exceptions.rb" line 19 in call_with_rollbar
3
File "/app/vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.14/lib/action_dispatch/middleware/show_exceptions.rb" line 56 in call
4
File "/app/vendor/bundle/ruby/2.0.0/gems/lograge-0.2.2/lib/lograge/rails_ext/rack/logger.rb" line 15 in call_app
5
File "/app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.14/lib/rails/rack/logger.rb" line 16 in block in call
6
File "/app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.14/lib/active_support/tagged_logging.rb" line 22 in tagged
7
File "/app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.14/lib/rails/rack/logger.rb" line 16 in call
8
File "/app/vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.14/lib/action_dispatch/middleware/request_id.rb" line 22 in call
9
File "/app/vendor/bundle/ruby/2.0.0/gems/rack-1.4.5/lib/rack/methodoverride.rb" line 21 in call
10
File "/app/vendor/bundle/ruby/2.0.0/gems/rack-1.4.5/lib/rack/runtime.rb" line 17 in call
11
File "/app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.14/lib/active_support/cache/strategy/local_cache.rb" line 72 in call
12
File "/app/vendor/bundle/ruby/2.0.0/gems/rack-1.4.5/lib/rack/lock.rb" line 15 in call
13
File "/app/vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.14/lib/action_dispatch/middleware/static.rb" line 63 in call
14
File "/app/vendor/bundle/ruby/2.0.0/gems/rack-ssl-1.3.3/lib/rack/ssl.rb" line 27 in call
15
File "/app/vendor/bundle/ruby/2.0.0/gems/rack-cache-1.2/lib/rack/cache/context.rb" line 136 in forward
16
File "/app/vendor/bundle/ruby/2.0.0/gems/rack-cache-1.2/lib/rack/cache/context.rb" line 245 in fetch
17
File "/app/vendor/bundle/ruby/2.0.0/gems/rack-cache-1.2/lib/rack/cache/context.rb" line 185 in lookup
18
File "/app/vendor/bundle/ruby/2.0.0/gems/rack-cache-1.2/lib/rack/cache/context.rb" line 66 in call!
19
File "/app/vendor/bundle/ruby/2.0.0/gems/rack-cache-1.2/lib/rack/cache/context.rb" line 51 in call
20
File "/app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.14/lib/rails/engine.rb" line 484 in call
21
File "/app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.14/lib/rails/application.rb" line 231 in call
22
File "/app/vendor/bundle/ruby/2.0.0/gems/rack-1.4.5/lib/rack/content_length.rb" line 14 in call
23
File "/app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.14/lib/rails/rack/log_tailer.rb" line 17 in call
24
File "/app/vendor/bundle/ruby/2.0.0/gems/rack-1.4.5/lib/rack/handler/webrick.rb" line 59 in service
25
File "/app/vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/httpserver.rb" line 138 in service
26
File "/app/vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/httpserver.rb" line 94 in run
27
File "/app/vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/server.rb" line 295 in block in start_thread
My routes look like this:
cancel_user_registration GET /signup/account/cancel(.:format) registrations#cancel
user_registration POST /signup/account(.:format) registrations#create
new_user_registration GET /signup/account/setup(.:format) registrations#new
edit_user_registration GET /signup/account/edit(.:format) registrations#edit
PUT /signup/account(.:format) registrations#update
DELETE /signup/account(.:format) registrations#destroy
The routes file:
devise_for :users, :controllers => {:registrations => "registrations"}, :path => "signup", :path_names => {:sign_in => "login", :sign_out => "logout", :password => "secret", :confirmation => "verification", :unlock => "unblock", :registration => "account", :sign_up => "setup"}
match "/users/account/setup" => "setup#index"
#Setup the routes for the setup process:
scope "/setup", controller: :setup, as: :setup do
match "" => "setup#signup"
match :signup
match :account
match :holidays
match :organization
match :add_employees
match :roster_product_options
match :account_holidays
match :import_employees
match :upgrade
match :roster_setup_complete
end

Resources