Category : redis

I have recently migrated to Horizon for all of my Laravel app queues management. I have 7 supervisors working 13 different queues based on my functional needs. All seem to work pretty fine… Except one queue that somehow stops processing jobs after a while. The supervisor definition that works this queue is as follows: ‘supervisor-general’ ..

Read more

I’m building a messenger system with Redis publishing on the Laravel end and subscribing on a node server. I would like to test what is stored in the redis pub method using PHPUnit, but I have no idea where to start. Controller class MessageController extends Controller { public function store(Conversation $conversation, Request $request) { $user ..

Read more

I was working with redis since 3 months. I’m using laravel. Today, suddenly my connections is lost and returned error like below; stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed IlluminateFoundationBootstrapHandleExceptions::handleError vendor/predis/predis/src/Connection/StreamConnection.php:246 I can connect to redis with my localhost. But It doesnt work on my AWS account. My ..

Read more

I have a job that is running each 10 minutes, and gives me a lot of : IlluminateQueueMaxAttemptsExceededException: AppJobsBlockchainToDb has been attempted too many times or run too long. The job may have previously timed out. in /home/ubuntu/acc/vendor/laravel/framework/src/Illuminate/Queue/Worker.php:750 Stack trace: #0 /home/ubuntu/acc/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(504): IlluminateQueueWorker->maxAttemptsExceededException() #1 /home/ubuntu/acc/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(418): IlluminateQueueWorker->markJobAsFailedIfAlreadyExceedsMaxAttempts() #2 /home/ubuntu/acc/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(378): IlluminateQueueWorker->process() #3 /home/ubuntu/acc/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(172): IlluminateQueueWorker->runJob() #4 /home/ubuntu/acc/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(117): IlluminateQueueWorker->daemon() ..

Read more

I am trying to use redis to store sessions for my codeigniter application however when opening the page i am getting the error below: An uncaught Exception was encountered Type: RedisException Message: read error on connection to myredis-test.redis.cache.windows.net:6380 Filename: /var/www/html/fmms/admin/system/libraries/Session/drivers/Session_redis_driver.php Below is my code for connection to redis server: $config[‘sess_driver’] = ‘redis’; $config[‘sess_cookie_name’] = ‘ci_session’; ..

Read more

I have a Laravel backend running on three nodes. There are some heavy jobs (Redis) which can run for several hours (new feature). The issue is that they keep failing. The error message is: AppJobsImportProducts has been attempted too many times or run too long. The job may have previously timed out. This happens only ..

Read more

We are serving multiple tenants with a laravel application, switching between tenants with: config([‘cache.prefix’ => $cachePrefix]); Cache::setPrefix($cachePrefix); Then sometimes when we call: Cache::tags(‘TagName’)->add($model->getTable(), 1, $this->refreshTime); We get this stack trace: ErrorException unserialize(): Error at offset 0 of 2 bytes /usr/share/vendor/laravel/framework/src/Illuminate/Cache/RedisStore.php:345 IlluminateFoundationBootstrapHandleExceptions::handleError [internal] unserialize /usr/share/vendor/laravel/framework/src/Illuminate/Cache/RedisStore.php:345 IlluminateCacheRedisStore::unserialize /usr/share/vendor/laravel/framework/src/Illuminate/Cache/RedisStore.php:64 IlluminateCacheRedisStore::get /usr/share/vendor/laravel/framework/src/Illuminate/Cache/TagSet.php:87 IlluminateCacheTagSet::tagId [internal] array_map /usr/share/vendor/laravel/framework/src/Illuminate/Cache/TagSet.php:76 IlluminateCacheTagSet::tagIds /usr/share/vendor/laravel/framework/src/Illuminate/Cache/TagSet.php:66 IlluminateCacheTagSet::getNamespace ..

Read more

No connection could be made because the target machine actively refused it. [tcp://127.0.0.1:6037] (View: C:laragonwwwProject CRMresourcesviewsusersindex.blade.php) keep getting the error in my laravel project , it only appears in my specific module of users and when i login with the user credentials , otherwise it does not affect my other modules of the code my ..

Read more

No connection could be made because the target machine actively refused it. [tcp://127.0.0.1:6037] this is my env code redis REDIS_CLIENT=predis REDIS_HOST=127.0.0.1 REDIS_PASSWORD=null REDIS_PORT=9999 got this error while developing in laravel. I was not even using redis. tried changing the port but still no luck , tried installing redis as per the suggestions provided on stack ..

Read more

I need to store specific object from array and retrieve it together with the other object inside array. $data= array( ["apple", "red"], ["banana", "yellow"], ["orange", "orange"], ) $cache = { [fruit:"banana", color:"yellow"], [fruit:"apple", color:"red"]//from cached in redis, [fruit:"orange", color:"yellow"], } return $cached Sourc..

Read more

I deploy my Laravel project on multiple servers, and my balancer distributes visitors between them. I want to organize broadcast Events via Redis (queue) and listen to Events on all servers (servers have a common redis db). I have Event class: use IlluminateBroadcastingChannel; use IlluminateBroadcastingInteractsWithSockets; use IlluminateContractsBroadcastingShouldBroadcast; use IlluminateFoundationEventsDispatchable; use IlluminateQueueSerializesModels; class BaseRedisEvent implements ShouldBroadcast ..

Read more