Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

ChatterBox XML Ticker randomly throwing messages away

by choroba (Bishop)
on Jul 04, 2019 at 16:01 UTC ( #11102411=monkdiscuss: print w/replies, xml ) Need Help??

This has been discussed in the ChatterBox several times, but it hasn't been mentioned in a more permanent manner.

I've created a ChatterBox client pm-cb-g that uses the New Chatterbox XML Ticker. When posting, sometimes the message is not displayed, but when I try to submit it again, I get back the dreaded Whoa, Cowboy! You said that already. Don't 'reload'? So somehow, PerlMonks thinks the message has been sent by me, but it doesn't display it.

It's never happened when posting from a browser.

I have a suspicion it's related to the fact one of our servers has a wrong timezone setting. When the message gets processed by it, the wrong timestamp makes it too old (or too far in the future) to be displayed. I tried to study the relevant nodes (chatrepeated and repeatedchatter), but my pmdev-fu is to weak. Can anyone help? Would it be possible to fix the timezone on the server so I can at least disprove the suspicion?

I usually append #2, #3 etc. to the message when reposting it to prevent the Whoa cowboy effect. My personal record is #7, the last message was posted via the browser as I lost patients.

map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]

Replies are listed 'Best First'.
Re: ChatterBox XML Ticker randomly throwing messages away
by LanX (Archbishop) on Jul 05, 2019 at 11:24 UTC
    What I don't understand, do you say
    • the 1. message is logged in the DB but never displayed?
    • the 1. is ignored and the 2. message is erroneously thought to be a duplicate?
    I think the first step for debugging would be to check what is logged and when it happens.

    Sorry no time to look deeper into this (too) ...

    HTH! :)

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery FootballPerl is like chess, only without the dice

      Yes, the first message isn't displayed, but it must be recorded in the DB, as reposting the same message fails with "Whoa cowboy". I have no idea how to check what is logged.

      map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]

      No, the message is not logged in the DB, at least not in the chat box portion. I can verify this because I store the PM ID numbers that come back with each message for the CB stats. When the stats service goes down and I miss it on reboot, I can see a "space" in the ID numbers. When this error is hit on my end, there is no gap.

      I no longer have pmdev access here (as per my own request years ago), but I seem to recall that there is a field in the user that stores the last message that that user posted, and is used for comparison to get the whoa-cowboy rejection message. It appears to me that the message gets to the server far enough to be saved to the user record, but fails between that and actually putting it into the CB table. I'd argue that it shouldn't get saved to the user record until it has been successfully saved to the CB table (or both as part of the same transaction), but that's just arguing about error handling and doesn't solve the underlying error.

      (Thanks, choroba, for posting this.)

        Thanks, great insight.

        > I no longer have pmdev access here

        I think the most efficient approach would be to make you pmdev again.

        > (as per my own request years ago),

        Shouldn't be a problem to leave afterwards again. :)

        Cheers Rolf
        (addicted to the Perl Programming Language :)
        Wikisyntax for the Monastery FootballPerl is like chess, only without the dice

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: monkdiscuss [id://11102411]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (7)
As of 2019-09-24 08:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The room is dark, and your next move is ...












    Results (290 votes). Check out past polls.

    Notices?