<div dir="ltr">Hi Razvan,<div><br><div>I actually gave up that idea and continued with life, however, turns out on another task I got face-to-face with exactly the same problem but with memcache here instead of redis. </div><div><br></div><div>The version Im using now is 2.2.2.</div><div><br></div><div>Apparently the documentation on this module is missing "limitations", I was unable to use redis, memcache, rest_post, hence its just an async-event way of printing xlog lines. </div><div><br></div><div>Please note that if I call this event_route without 'async' atleast memcache ops work, which are no help since ts invoked inside the processing of the same call, this may even take more toll on the CPU usage since we're now raising event to do the same thing that can be done with just an ordinary route.</div><div><br></div><div>Example:<br><br></div><div><font face="monospace, monospace">if(save("location")) </font></div><div><font face="monospace, monospace">    </font><span style="font-family:monospace,monospace">route(DO_SOMETHING);<br><br></span></div><div>With events triggered w/o async this looks like.<br></div><div><br></div><div><font face="monospace, monospace">save("location");</font></div><div><span style="font-family:monospace,monospace">...</span></div><div><span style="font-family:monospace,monospace">event_route[</span><span style="font-family:monospace,monospace;font-size:12.8px">E_UL_CONTACT_</span><wbr style="font-family:monospace,monospace;font-size:12.8px"><span style="font-family:monospace,monospace;font-size:12.8px">INSERT]{</span><br></div><div><font face="monospace, monospace"><span style="font-size:12.8px">      # everything route[</span></font><span style="font-family:monospace,monospace">DO_SOMETHING</span><font face="monospace, monospace"><span style="font-size:12.8px">] could do plus events-overhead, still some limitations</span></font></div><div><span style="font-size:12.8px"><font face="monospace, monospace">}</font></span></div><div><span style="font-family:monospace,monospace;font-size:12.8px"><br></span></div><div><span style="font-family:monospace,monospace;font-size:12.8px">With event route in async mode</span><br></div><div><div><span style="font-family:monospace,monospace"><br></span></div><div><span style="font-family:monospace,monospace">event_route[</span><span style="font-family:monospace,monospace;font-size:12.8px">E_UL_CONTACT_</span><wbr style="font-family:monospace,monospace;font-size:12.8px"><span style="font-family:monospace,monospace;font-size:12.8px">INSERT,async]{</span><br></div><div><font face="monospace, monospace"><span style="font-size:12.8px">       # route[</span></font><span style="font-family:monospace,monospace">DO_SOMETHING</span><font face="monospace, monospace"><span style="font-size:12.8px">] with xlog capability only. :D</span></font></div><div><span style="font-size:12.8px"><font face="monospace, monospace">}</font></span></div></div><div><br></div><div>Thanks,</div><div>Sammy.</div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jun 22, 2016 at 2:45 PM, SamyGo <span dir="ltr"><<a href="mailto:govoiper@gmail.com" target="_blank">govoiper@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Thanks Razvan for dedicating time for me.<div>You can find the output from the given command here: <a href="http://pastebin.com/fh11mkXS" target="_blank">http://pastebin.com/<wbr>fh11mkXS</a></div><div><br></div><div><br></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jun 22, 2016 at 12:48 PM, Răzvan Crainea <span dir="ltr"><<a href="mailto:razvan@opensips.org" target="_blank">razvan@opensips.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    <p><tt>Could you run the 'opensipsctl trap' command and paste the
        output on pastebin.<br>
      </tt></p>
    <p><tt>Best regards,<br>
      </tt></p><span>
    <pre cols="72">Răzvan Crainea
OpenSIPS Solutions
<a href="http://www.opensips-solutions.com" target="_blank">www.opensips-solutions.com</a></pre>
    </span><div><div class="m_-3352863606820048006h5"><div>On 06/22/2016 07:39 PM, SamyGo wrote:<br>
    </div>
    <blockquote type="cite">
      <p dir="ltr">Yes correct. Async event route even stops to be
        executed. </p>
      <div class="gmail_quote">On Jun 22, 2016 12:37, "Răzvan Crainea"
        <<a href="mailto:razvan@opensips.org" target="_blank">razvan@opensips.org</a>>
        wrote:<br type="attribution">
        <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
          <div bgcolor="#FFFFFF" text="#000000">
            <p><tt>So the patch doesn't do anything but stops triggering
                the event?</tt></p>
            <p><tt>Regards,</tt><br>
            </p>
            <pre cols="72">Răzvan Crainea
OpenSIPS Solutions
<a href="http://www.opensips-solutions.com" target="_blank">www.opensips-solutions.com</a></pre>
            <div>On 06/22/2016 07:07 PM, SamyGo wrote:<br>
            </div>
            <blockquote type="cite">
              <div dir="ltr">Yeah it only happens at startup. If I start
                opensips in debug_mode=yes then the error prints for
                infinite time.
                <div><br>
                </div>
                <div>With your patch; putting "async" doesn't even call
                  the event route. If I remove async attribute then it
                  works just like before the patch.</div>
                <div><br>
                </div>
                <div>Regards,</div>
                <div>Sammy</div>
                <div><br>
                </div>
              </div>
              <div class="gmail_extra"><br>
                <div class="gmail_quote">On Wed, Jun 22, 2016 at 3:10
                  AM, Răzvan Crainea <span dir="ltr"><<a href="mailto:razvan@opensips.org" target="_blank"></a><a href="mailto:razvan@opensips.org" target="_blank">razvan@opensips.org</a>></span>
                  wrote:<br>
                  <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                    <div bgcolor="#FFFFFF" text="#000000">
                      <p><tt>Hi, Sammy!</tt></p>
                      <p><tt>Does this happen only at startime, or
                          happens during runtime too?</tt></p>
                      <p><tt>Regards,<br>
                        </tt></p>
                      <span>
                        <pre cols="72">Răzvan Crainea
OpenSIPS Solutions
<a href="http://www.opensips-solutions.com" target="_blank">www.opensips-solutions.com</a></pre>
                      </span>
                      <div>
                        <div>
                          <div>On 06/21/2016 10:57 PM, SamyGo wrote:<br>
                          </div>
                          <blockquote type="cite">
                            <div dir="ltr">Hi ,
                              <div><br>
                              </div>
                              <div>After recompiling , when I start
                                opensips it gives this error:</div>
                              <div><br>
                              </div>
                              <div><font face="monospace, monospace">ERROR:event_route:event_route_<wbr>handler:
                                  invalid receive sock info<br>
                                </font><br>
                              </div>
                              <div>The two event routes I have are
                                these:<br>
                                <br>
                              </div>
                              <div>
                                <div><font face="monospace, monospace">event_route[E_UL_CONTACT_<wbr>INSERT,async]
                                    {</font></div>
                                <div><font face="monospace, monospace"> 
                                                 
fetch_event_params("aor=$avp(<wbr>aor);address=$avp(address);<wbr>received=$avp(received)");</font></div>
                              </div>
                              <div><font face="monospace, monospace">....
                                                 </font></div>
                              <div><font face="monospace, monospace">   
                                             
                                   cache_raw_query("redis:<wbr>group1","HSET
                                  GLOBAL_USER_LOCATION $avp(aor)
                                  $var(my_value1)");<br>
                                </font></div>
                              <div><font face="monospace, monospace"><br>
                                  }</font></div>
                              <div><font face="monospace, monospace"><br>
                                </font></div>
                              <div>
                                <div><font face="monospace, monospace">event_route[E_UL_AOR_DELETE,<wbr>async]
                                    {</font></div>
                                <div><font face="monospace, monospace"> 
                                                 
                                    fetch_event_params("aor=$avp(<wbr>aor)");<br>
                                  </font></div>
                              </div>
                              <div><font face="monospace, monospace">...<br>
                                </font>
                                <div><font face="monospace, monospace"> 
                                                 
                                    cache_raw_query("redis:group1"<wbr>,"DEL
                                    GLOBAL_USER_LOCATION $avp(aor)");</font></div>
                              </div>
                              <div><font face="monospace, monospace"><br>
                                </font></div>
                              <div><font face="monospace, monospace">}</font></div>
                              <div><br>
                                <br>
                              </div>
                              <div>Some Xlog lines in both of these
                                routes, nothing seems to be printed now,
                                no error , no cache data modifications
                                executing..</div>
                              <div><br>
                              </div>
                              <div>I'll see in further detail what is
                                happening and if I find anything
                                abnormal will reply.</div>
                              <div><br>
                              </div>
                              <div><br>
                              </div>
                              <div>Regards.</div>
                              <div>Sammy</div>
                              <div><br>
                              </div>
                              <div><br>
                                <br>
                              </div>
                            </div>
                            <div class="gmail_extra"><br>
                              <div class="gmail_quote">On Tue, Jun 21,
                                2016 at 3:40 AM, Răzvan Crainea <span dir="ltr"><<a href="mailto:razvan@opensips.org" target="_blank"></a><a href="mailto:razvan@opensips.org" target="_blank">razvan@opensips.org</a>></span>
                                wrote:<br>
                                <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                                  <div bgcolor="#FFFFFF" text="#000000">
                                    <p><tt>Hi, Sammy!</tt></p>
                                    <p><tt>Could you try this patch:</tt></p>
                                    <p><tt><a href="https://gist.github.com/razvancrainea/9d239c82474bb0f1c403b6459dbdb647" target="_blank">https://gist.github.com/<wbr>razvancrainea/<wbr>9d239c82474bb0f1c403b6459dbdb6<wbr>47</a></tt></p>
                                    <p><tt>Thanks,<br>
                                      </tt></p>
                                    <pre cols="72">Răzvan Crainea
OpenSIPS Solutions
<a href="http://www.opensips-solutions.com" target="_blank">www.opensips-solutions.com</a></pre>
                                    <div>
                                      <div>
                                        <div>On 06/19/2016 08:56 PM,
                                          SamyGo wrote:<br>
                                        </div>
                                      </div>
                                    </div>
                                    <blockquote type="cite">
                                      <div>
                                        <div>
                                          <div dir="ltr">Hi,
                                            <div>I'm seeing errors from
                                              cachedb_redis module when
                                              called in an event route
                                              in async mode.</div>
                                            <div><br>
                                            </div>
                                            <div><font face="monospace,
                                                monospace">event_route[E_UL_CONTACT_<wbr>INSERT<span style="background-color:rgb(255,229,153)">,async</span>] {</font></div>
                                            <div><font face="monospace,
                                                monospace">... </font></div>
                                            <div><font face="monospace,
                                                monospace">cache_raw_query("redis:group1"<wbr>,"SET
                                                ABC");</font></div>
                                            <div><font face="monospace,
                                                monospace">..</font></div>
                                            <div><font face="monospace,
                                                monospace"><br>
                                              </font></div>
                                            <div><font face="monospace,
                                                monospace">}</font></div>
                                            <div><font face="monospace,
                                                monospace"><br>
                                              </font></div>
                                            <div><font face="arial,
                                                helvetica, sans-serif">OpenSIPS
                                                throws error stating
                                                that redis group1
                                                unavailable</font></div>
                                            <div><font face="monospace,
                                                monospace"><br>
                                              </font></div>
                                            <div>
                                              <div style="font-family:monospace,monospace">DBG:core:cachedb_raw_query:
                                                from script [redis] -
                                                with grp [group1]</div>
                                              <div style="font-family:monospace,monospace">ERROR:core:cachedb_raw_query:
                                                failed to get connection
                                                for grp name [group1]</div>
                                              <div style="font-family:monospace,monospace"><br>
                                              </div>
                                              <div><font face="arial,
                                                  helvetica, sans-serif">I
                                                  tried same command in
                                                  main route of reply
                                                  route, all works
                                                  normal. if I remove
                                                  the "async" from the
                                                  event_route definition
                                                  it works in event
                                                  route.</font></div>
                                              <div><font face="arial,
                                                  helvetica, sans-serif"><br>
                                                </font></div>
                                              <div><font face="arial,
                                                  helvetica, sans-serif">Any
                                                  logical reason why
                                                  async route don't
                                                  recognize the
                                                  connections ?</font></div>
                                            </div>
                                            <div><font face="arial,
                                                helvetica, sans-serif"><br>
                                              </font></div>
                                            <div><font face="arial,
                                                helvetica, sans-serif">Tried
                                                with OpenSIPS 2.2 and
                                                2.1 as well, same
                                                behavior.</font></div>
                                            <div><font face="arial,
                                                helvetica, sans-serif"><br>
                                              </font></div>
                                            <div><font face="arial,
                                                helvetica, sans-serif"><br>
                                              </font></div>
                                            <div><font face="arial,
                                                helvetica, sans-serif">Regards,</font></div>
                                            <div><font face="arial,
                                                helvetica, sans-serif">Sammy</font></div>
                                            <div><font face="arial,
                                                helvetica, sans-serif"><br>
                                              </font></div>
                                          </div>
                                          <br>
                                          <fieldset></fieldset>
                                          <br>
                                        </div>
                                      </div>
                                      <pre>______________________________<wbr>_________________
Users mailing list
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-<wbr>bin/mailman/listinfo/users</a>
</pre>
                                    </blockquote>
                                    <br>
                                  </div>
                                  <br>
______________________________<wbr>_________________<br>
                                  Users mailing list<br>
                                  <a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
                                  <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-<wbr>bin/mailman/listinfo/users</a><br>
                                  <br>
                                </blockquote>
                              </div>
                              <br>
                            </div>
                            <br>
                            <fieldset></fieldset>
                            <br>
                            <pre>______________________________<wbr>_________________
Users mailing list
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-<wbr>bin/mailman/listinfo/users</a>
</pre>
                          </blockquote>
                          <br>
                        </div>
                      </div>
                    </div>
                    <br>
                    ______________________________<wbr>_________________<br>
                    Users mailing list<br>
                    <a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
                    <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-<wbr>bin/mailman/listinfo/users</a><br>
                    <br>
                  </blockquote>
                </div>
                <br>
              </div>
              <br>
              <fieldset></fieldset>
              <br>
              <pre>______________________________<wbr>_________________
Users mailing list
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-<wbr>bin/mailman/listinfo/users</a>
</pre>
            </blockquote>
            <br>
          </div>
          <br>
          ______________________________<wbr>_________________<br>
          Users mailing list<br>
          <a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
          <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-<wbr>bin/mailman/listinfo/users</a><br>
          <br>
        </blockquote>
      </div>
      <br>
      <fieldset></fieldset>
      <br>
      <pre>______________________________<wbr>_________________
Users mailing list
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-<wbr>bin/mailman/listinfo/users</a>
</pre>
    </blockquote>
    <br>
  </div></div></div>

<br>______________________________<wbr>_________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-<wbr>bin/mailman/listinfo/users</a><br>
<br></blockquote></div><br></div>
</div></div></blockquote></div><br></div>