Forum Activity for @brian

brian
@brian
03/18/15 01:55:13PM
10,167 posts

unable to confirm local audio file for conversion3


Jamroom Developers

DannyA:I have been seeing this error more and more. I think its related to the s3 module. Do you have any idea what it means?

Yes - there is a Media function called:

jrCore_confirm_media_file_is_local()

What this function is used for is to say "make sure the file is on the same server I am calling from". If it is on S3 it goes and gets it and copies it over locally. This is needed so the conversion functions can operate on the file.

If you are seeing this error it means it could NOT copy the file from S3 to the local filesystem.

Let me know if that helps.
updated by @brian: 03/18/15 01:55:35PM
brian
@brian
03/18/15 01:52:22PM
10,167 posts

Queue error logging


Jamroom Developers

DannyA:Forget about the queue. Again, after the conversion function has failed 3 consecutive times, we have not idea why.

We don't know why it failed, what users, what media.

So the a queue log entry telling me something has failed is useless. It does not help us identify and fix the probelem. So a user can potentially be re-submitting a failing job countless times and we can't identify it or fix it.

There are many thing that can cause the function to fail: unable to read/write, corrupt files, invalid formats, etc....

That's right - the core is not supposed to tell you what went wrong - that is what I keep saying. Only the worker function can tell you want went wrong. By the time you see the "3rd time failing" error message from the core, that can only tell you something went wrong, and to start investigating - it is a "last gasp" "oops something has gone really wrong and you should check it out".

Again - the CORE queue functions have no idea what you are doing, what a queue worker is doing, etc. It does NOT know that the worker could not "download a file", or whatever. In theory queue workers could be doing thousands of different things. It only provides the framework for handling queue entries.

So again - nothing is needed at the core queue level, nor will we be making any changes since no changes are needed. It is functioning 100% as it should.

So with that said, I think what you are getting at is that the conversion process is failing and you don't know WHY. Debugging it is just like debugging anything else:

- go into the conversion function
- add print lines - i.e. fdebug('made it to here'); all over the place
- run the function and see where it gets to.

There's no magical way to figure it out - you just have to debug it.
brian
@brian
03/18/15 01:46:05PM
10,167 posts

All about the Poweruser - Glossary term request


Using Jamroom

researchcooperative:Please explain "Poweruser"

1. Where does the Admin set it up?

ACP -> Users -> User Accounts -> Quota Config -> "Power User Enabled".

Quote:2. How can the User use it? (What powers can they acquire?)

They can create additional profiles. For example - let's say you create a quota called "record Labels", and enable Power user for the quota. Now, when a user signs up in your site to the Record Label quota, they can create a profile for each artist they manage. The user has access to all the profiles and can update them as if they were their own.

Let me know if that helps.
brian
@brian
03/18/15 01:24:35PM
10,167 posts

Queue error logging


Jamroom Developers

The code you posted is from the Audio module and works no problem. Were you trying to highlight something?
brian
@brian
03/18/15 01:23:43PM
10,167 posts

Queue error logging


Jamroom Developers

Natedogg265:I understand I can log an error inside my queue functions. What his complaint is, is that the queue just hangs and we have to manually delete it.

The queue will never just "hang" - that's not how it works or what it does. Again if a queue entry seems to be "stuck" it is a worker issue - it always is. The core queue functions themselves only check to see that a queue has not been held on to by a single worker for longer than you have it configured for, or that it has failed 3 consecutive tries - that's it - it does not do any other checking.
brian
@brian
03/18/15 01:19:35PM
10,167 posts

Queue error logging


Jamroom Developers

Natedogg265:Now that I look there is error checking already written. So they aren't the problem.

When you say "there is error checking already written" what do you mean? What type of error checking?
brian
@brian
03/18/15 01:14:08PM
10,167 posts

Queue error logging


Jamroom Developers

DannyA:Both. I think you're missing the point.

Assume a 100% stock install. How would you troubleshoot that? What I'm trying to say is that their is no error logging in the conversion functions and it makes it very difficult to troubleshoot when things go wrong. We don't know WHY its bombing.

I hear you. If there is an actual failure, then it is likely logged (the conversion function has quite a bit of logging in it). If it actually "bombs" out (this can happen for example if you make a system() call that bombs out), then unfortunately the process crashes and JR is not able to log anything - the process no longer exists.

So it is hard to tell the exact reason a process is bombing - if you can reproduce it, then add fdebug calls in at every step and see how far in the process you get.

We run a conversion server here for hosting and it's handled many tens of thousands of conversions with only a handful of issues, so the conversion functions are pretty solid. If you're keying off an event during conversion then add some fdebug calls in to your code to see where you are getting to.
brian
@brian
03/18/15 12:52:34PM
10,167 posts

Queue error logging


Jamroom Developers

DannyA:Ok. But the worker function I'm talking about is a song conversion. That's your worker function. And its not logging anything.

I'm not aware of issues with it, but if you're getting an error like this:

deleted queue entry running for 5586 seconds - 3rd time failing

then it likely means the process is "bombing" - something is causing it to crash so it cannot log or cleanup.

Is this on a 100% stock install? Or are you keying custom functions off of a conversion event?
brian
@brian
03/18/15 12:45:52PM
10,167 posts

Custom notifications


Jamroom Developers

DannyA:So is there no way to select a profile an send a notification to all linked accounts according to their preferences?

Sure there is - you just need to get the users first, then loop over them and send the notification - i.e.

$profile_id = 5;  // whatever profile_id you want to send to
$_users = jrProfile_get_owner_info($profile_id);
if ($_users && is_array($_users)) {
    foreach ($_users as $_us) {
        jrUser_notify($_us['_user_id'], 0, 'MyModule', 'module_action', $sub, $msg);
    }
}

Quote:Incidentally, I noticed that notification preferences are not registered in the user table until a user saves them for the first time. Is this by design?

yes - that is by design. The default is "email".

Let me know if that helps.
updated by @brian: 03/18/15 12:46:07PM
brian
@brian
03/18/15 12:40:25PM
10,167 posts

Queue error logging


Jamroom Developers

DannyA:So maybe what I am asking is for the worker function to provide some level of failure logging.

For example, if I get
"deleted queue entry running for 5586 seconds - 3rd time failing"

I have no idea what song this was for, what went wrong, or how to fix it. Was there a problem with the file format? Was the encoder unable to grab the file? were we unable to write a new file? etc,,,,

The function needs some error logging.

The problem is that the Core has no idea what you are doing in your worker function - that's for you to develop. The Queue system in Jamroom is a framework for running queue entries - that's it. Your worker functions are going to need to have whatever logic they need them to figure out what went wrong and properly log it as well as exit properly.
  405