Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Tobbe 81 posts 387 karma points c-trib
    Sep 03, 2014 @ 15:10
    Tobbe
    0

    Custom order/product Calculator stops working after a while

    Ive made a custom order and product calculator to handle campaigns. They check all nodes with doctype "Campaign" and if the Campaign-node got the product in a multi-tree-picker I recalc the new price (which I get from the Campaign-node).

    The weird part is that this works just fine for a while (like a day) then it suddenly stops working without any errors. It seems like my custom calculators just stops being called. To fix it I just has to touch it (changing a line or so)..

    Any ideas what could cause this?

    Thanks

  • Anders Burla 2560 posts 8256 karma points
    Sep 03, 2014 @ 15:40
    Anders Burla
    0

    Hi Tobbe

    So the entire Tea Commerce still works but just your custom calculator that stops working at some point?

    Do you know for how long it works and then stops?

    Well the Autofac code is only run when the application is starting and the should be used the rest of the time. So weird if TC works and just your custom code that gets unloaded.

    Kind regards
    Anders

  • Tobbe 81 posts 387 karma points c-trib
    Sep 03, 2014 @ 15:54
    Tobbe
    0

    Yea teacommerce runs fine, its only the calculator that "stops working" (not used. Ive made it Log something before I return the price but its not logged).

    I dont know how long it works Im afraid. I'll try to find out.

    Its weird that it first works then stops working without any warning. hmmmm

  • Tobbe 81 posts 387 karma points c-trib
    Sep 04, 2014 @ 11:05
    Tobbe
    0

    do you have any ideas I could try Anders?

  • Anders Burla 2560 posts 8256 karma points
    Sep 04, 2014 @ 15:07
    Anders Burla
    0

    Could you in your code add a custom property to the order with the Datetime.Now everytime your code is run. That might give you an idea of for how long it runs and when it stops. So record when you first added this property and when it stops.

    Kind regards
    Anders

  • Tobbe 81 posts 387 karma points c-trib
    Sep 04, 2014 @ 15:42
    Tobbe
    0

    I kicked on the file yesterday at 1700, and then this morning at 8 it didnt work, so not even a day.

    Can I manually overwrite the default calculator-files somehow?

  • Anders Burla 2560 posts 8256 karma points
    Sep 05, 2014 @ 08:11
    Anders Burla
    0

    No - the only way to overwrite is to use the suppress dependency attribute, but you properly already did that :)

    Its just that we have lots of setups where the custom runs fine for days and days without any problems. Using the latest Tea Commerce version? Has the right folder permissions?

    Kind regards
    Anders

  • Tobbe 81 posts 387 karma points c-trib
    Sep 05, 2014 @ 13:49
    Tobbe
    100

    hmmmmm, it seems like my assembly sometimes (randomly) isnt loaded in to IIS memory. The site sometimes goes into sleep due to inactivity, and when it's started again sometimes my prodCalc assembly isnt loaded. Its weird.. but I think I've solved it by putting my calculator in App_Code instead of a dll.

    It has been working for almost a day now :)

  • Anders Burla 2560 posts 8256 karma points
    Sep 08, 2014 @ 08:24
    Anders Burla
    0

    Does your code still works when it is in the App_Code folder? :)

  • Tobbe 81 posts 387 karma points c-trib
    Sep 08, 2014 @ 08:27
    Tobbe
    0

    YUP! it seems like it solved it :)

Please Sign in or register to post replies

Write your reply to:

Draft