为什么我在 Odoo 记录器上收到此调试消息?:​​“openerp.modules.registry:多进程信令检查”?

为什么我在 Odoo 记录器上收到此调试消息?:​​“openerp.modules.registry:多进程信令检查”?

我正在使用 Odoo v8,workers=5并为每个工作人员分配 1GB。

我已经使用 NginX 配置了 Odoo,并收到以下消息。使用该实例的人抱怨 Odoo 速度太慢。这可能与速度慢有关吗?

我为 NginX 使用了 3 个 worker

openerp.modules.registry: Multiprocess signaling check: [Registry - old# 1 new# 1] [Cache - old# 3 new# 3]

主要是用户使用两个不同的数据库我得到这些组合,每个数据库一个:

[Registry - old# 1 new# 1] [Cache - old# 1 new# 1]      >> database 1
[Registry - old# 1 new# 1] [Cache - old# 3 new# 3]      >> database 2

更新。这是打印调试消息的方法,但我不知道是什么,registry也不知道这是否不好。此外,有时我会收到以下消息:Invalidating all model caches after database signaling.

@classmethod
def check_registry_signaling(cls, db_name):
    """
    Check if the modules have changed and performs all necessary operations to update
    the registry of the corresponding database.


    :returns: True if changes has been detected in the database and False otherwise.
    """
    changed = False
    if openerp.multi_process and db_name in cls.registries:
        registry = cls.get(db_name)
        cr = registry.cursor()
        try:
            cr.execute("""
                SELECT base_registry_signaling.last_value,
                       base_cache_signaling.last_value
                FROM base_registry_signaling, base_cache_signaling""")
            r, c = cr.fetchone()
            _logger.debug("Multiprocess signaling check: [Registry - old# %s new# %s] "\
                "[Cache - old# %s new# %s]",
                registry.base_registry_signaling_sequence, r,
                registry.base_cache_signaling_sequence, c)
            # Check if the model registry must be reloaded (e.g. after the
            # database has been updated by another process).
            if registry.base_registry_signaling_sequence is not None and registry.base_registry_signaling_sequence != r:
                changed = True
                _logger.info("Reloading the model registry after database signaling.")
                registry = cls.new(db_name)
            # Check if the model caches must be invalidated (e.g. after a write
            # occured on another process). Don't clear right after a registry
            # has been reload.
            elif registry.base_cache_signaling_sequence is not None and registry.base_cache_signaling_sequence != c:
                changed = True
                _logger.info("Invalidating all model caches after database signaling.")
                registry.clear_caches()
                registry.reset_any_cache_cleared()
            registry.base_registry_signaling_sequence = r
            registry.base_cache_signaling_sequence = c
        finally:
            cr.close()
    return changed

这是正常行为吗?

相关内容