I have enabled the PDO Periodic Pings for GOS:WebSocketBundle, I'm still getting this error from time to time:
09:41:28 ERROR [websocket] Connection error occurred Warning: Error
while sending QUERY packet. PID=30536 in /home/dev.symfony/libs/composer_vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php
10:00:23 ERROR [websocket] Connection error occurred
SQLSTATE[HY000]: General error: 2006 MySQL server has gone away in
/home/dev.symfony/libs/composer_vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php
line 107 ["connection_id" => 3365,"session_id" =>
"11667050395acf121709d30728596936"] []
Another point is that if nobody use dev server, in logs no errors, but if I login to this immediatelly appear this error.
There is issue opened also on github https://github.com/GeniusesOfSymfony/WebSocketBundle/issues/299
but no answers, so I asked also here. Thank you.
Solved. Problem was that I defined periodic timer inside Topic inside "onSubscribe" funciton like:
public function onSubscribe(ConnectionInterface $connection, Topic $topic, WampRequest $request)
{
...
$topicTimer = $connection->PeriodicTimer;
//Add periodic timer every 3 seconds update
$topicTimer->addPeriodicTimer('notifications', 3, function() use ($topic, $connection) {
$user = $this->clientManipulator->getClient($connection);
if($user) {
$counters = $this->globalVariables->getCounters($user);
$connection->event($topic->getId(),['msg' => $counters]);
}
});
...
}
But now I switched to "standalone" periodic like it described here https://github.com/GeniusesOfSymfony/WebSocketBundle/blob/master/Periodic/PdoPeriodicPing.php
and attached this to websocket. Now there is no timeout with database.
It's worth noting that when you follow the Symfony documentation with creating PdoSessionHandler http://symfony.com/doc/current/doctrine/pdo_session_storage.html where you are passing the dsn instead of pdo service it won't work, because the session handler will create other connection. To solve this create a pdo service and pass it to the PdoSessionHandler like it is described in the https://github.com/GeniusesOfSymfony/WebSocketBundle/blob/master/Resources/docs/SessionSetup.md
Related
I am coming to you because I have a problem with prestashop, when I try to generate an invoice after purchase, the site sends me back to an error 500 and I cannot recover my invoice, what to do?
Error returned to me by the site in production mode:
Oops! An Error Occurred
The server returned a "500 Internal Server Error".
Something is broken. Please let us know what you were doing when Ibis error occurred. We will fur it as soon as possible. Sorry for any inconvenience caused.
Error returned to me by the site in developement mode:
ClassNotFoundException
Attempted to load class "DpTools" from the global namespace. Did you forget a "use" statement?
in override/classes/order/OrderInvolce.php (line 52)
$products = parent::getProducts($products, $selected_products, $selected_pty);
if (is_array($products)))
{
foreach ($products as $index => $product)
{
if ((int)$product['id_product'] == DpTools::getSpecialProduct())//<< error Line
unset($products[$index])
}
}
return $products;
}
This error means that your Prestashop OrderInvoice.php file had been overriden by a module and it's not the original one.
Try inspecting
override/classes/order/OrderInvoice.php
in your FTP - You should be able to find the module name that is causing the override in a comment.
Then try to disable or uninstall that module and see if the issue is still there.
Otherwise you can try to rename that override/classes/order/OrderInvoice.php and empty the cache so the original one will be used , this will probably interfere with that module functionalities , though.
I recently upgraded our artifactory repository from 2.6.5 to the current version 5.4.6.
However, something seems to have gone wrong in the process. There are some artifacts that throw a HTTP 500 error when attempting to access them. Here is an example using wget:
wget http://xyz.server.com:8081/artifactory/gradle/org/jfrog/buildinfo/build-info-extractor-gradle/2.0.12/build-info-extractor-gradle-2.0.12.pom
--2017-09-12 12:17:13--
http://xyz.server.com:8081/artifactory/gradle/org/jfrog/buildinfo/build-info-extractor-gradle/2.0.12/build-info-extractor-gradle-2.0.12.pom
Resolving xyz.server.com (xyz.server.com)... 10.125.1.28
Connecting to xyz.server.com (xyz.server.com)|10.125.1.28|:8081... connected.
HTTP request sent, awaiting response... 500 Internal Server Error
2017-09-12 12:17:13 ERROR 500: Internal Server Error.
I verified this by going to the artifactory site, browsing to the object in question, and trying to download it. The result was the following:
{
"errors" : [ {
"status" : 500,
"message" : "Could not process download request: Binary provider has no content for 'e52a9a9a58d6829b7b13dd841af4b027c88bb028'"
} ]
}
The problem seems to be in the final step of the upgrade process, upgrading from 3.9.5 to 5.4.6. The wget command above works on 3.9.5, but not on the 5.4.6 instance.
I found a reference to a "Zap Cache" function in older documentation and thought it might fix things, but I don't seem to be able to find that function in the current site.
Is anyone able to point me to: a way to fix this issue, or what I need to do/look for in the upgrade process in order to prevent it from occurring?
As a further data point, we're using an Oracle database for the full file store, if that matters in any way (using the tag: <chain template="full-db"> in binarystore.xml)
Thanks in advance....
Thanks a lot for giving your time and reading this,
I have gone though the WPA enterprise question posted in the ESP8266 forum and the related links, but it's not able to help me so I'm starting another topic.
I am trying to connect my ESP to my office network.
To connect through mobile this is usually is the setting:
SSID:PanLAN
EAP methode : PEAP
Phase 2 authentication: None
Ca Certificate: None
Identity: Asia-Pacific\SLAIK
password: Badonkadong
I took the edurom.ino from joostd's github and tried to run it.
https://github.com/genomics-admin/esp8266-eduroam/tree/master/Arduino
I got the following error.
error: 'wifi_station_set_username' was not declared in this scope
wifi_station_set_username(identity, sizeof(identity));
^
ESP8266_PEAPAuth:323: error: 'wifi_station_set_cert_key' was not declared in this scope
if( wifi_station_set_cert_key(testuser_cert_pem, testuser_cert_pem_len, testuser_key_pem, testuser_key_pem_len, NULL, 0) == 0 ) {
^
ESP8266_PEAPAuth:337: error: 'wifi_station_clear_cert_key' was not declared in this scope
wifi_station_clear_cert_key();
^
ESP8266_PEAPAuth:338: error: 'wifi_station_clear_username' was not declared in this scope
wifi_station_clear_username();
^
exit status 1
'wifi_station_set_username' was not declared in this scope.
I'm new to ESP/Arduino however to my eyes it looks like i'm missing the user_interface.h and c_type.h file.
The github account don't have them, so where can I get
them from?
I know user_interface.h is available on github
from other projects, but can I use them?
If yes, then
where shall I put the user_interface.h after downloading?
I found ctype.h in my computer # "C:\Program Files
(x86)\Arduino\hardware\tools\avr\avr\include" is it the same as
c_type.h mentioned in the code? can I rename and use ctype.h?
Is there any other/better example available for me to
follow and get my ESP connected to the network?
Getting this error soon after running riak start despite a config file that should be working correctly.
Turns out that this is a limit of Riak's error messaging: you will get the above message if you try to do a riak-admin test on your setup before the configuration has finished loading.
I encountered the same problem while starting new Riak clusters over and over again during automated testing. My solution was, in my test fixture setup, to execute code that keeps trying to put an object into a Riak bucket and then eventually succeeding.
Granted, my solution here is an Erlang snippet but it generally solves this problem in lieu of any Riak-supplied admin/wait functions. But since I've used a number of different Riak versions this technique here seems to work for all of them.
wait_for_riak() ->
{ok, C} = riak:local_client(),
io:format("Waiting for Raik..."),
wait_for_riak(C),
io:format("and had a successful put.~n").
wait_for_riak(C) ->
Strawman = riak_object:new(<<"test">>, <<"strawman">>, []),
case C:put(Strawman, 1) of
ok ->
ok;
_Error ->
receive after 1000 -> ok end,
wait_for_riak(C)
end.
adding sleep 4 like so:
brew install riak
riak start
sleep 4
riak-admin test
should help
I'm new to Riak , Here's the ruby code I tried in irb:
irb(main):002:0> c = Riak::Client.new
=> #<Riak::Client http://127.0.0.1:8098>
irb(main):003:0> obj = c['videos']['first']
RuntimeError: The NetHTTP HTTP backend cannot be used. Please check its requirements.
from /usr/local/lib/ruby/gems/1.9.1/gems/riak-client-0.9.8/lib/riak/client.rb:247:in `http'
from /usr/local/lib/ruby/gems/1.9.1/gems/riak-client-0.9.8/lib/riak/client.rb:276:in `backend'
from /usr/local/lib/ruby/gems/1.9.1/gems/riak-client-0.9.8/lib/riak/bucket.rb:102:in `get'
from (irb):3
from /usr/local/bin/irb:12:in `<main>'
How could I solve this problem?
Thanks, and Happy Holidays!
I encountered this error message because I was specifying a port number different from the one Riak was using as such:
client = Riak::Client.new(:port => 8091, :http_backend => :Excon)
Maybe Riak is running on a different port for you or not running at all. To fix this, I just removed the port number:
client = Riak::Client.new(:http_backend => :Excon)
The error message clearly says that it's missing the requirements.
You should install them according to documentation or maybe just try another backend.